#top-level #hash-map #iana #domain #list #static #org

tld

Top Level domain static hash map, tld list is obtained from of iana.org

52 stable releases

Uses old Rust 2015

2.35.0 Feb 17, 2024
2.33.0 Sep 6, 2023
2.32.0 Jul 21, 2023
2.30.0 Nov 27, 2022
0.2.0 Feb 21, 2017

#7 in #org

Download history 3/week @ 2024-01-26 164/week @ 2024-02-16 26/week @ 2024-02-23 8/week @ 2024-03-01 19/week @ 2024-03-08 5/week @ 2024-03-15 119/week @ 2024-03-29

144 downloads per month

BSD-3-Clause

47KB
1.5K SLoC

tld Rust

Top Level domain static hash map, tld list is obtained from of iana.org

extern crate tld;

assert!(tld::exist("com"));
assert!(tld::exist("io"));
assert!(tld::exist("lt"));
assert!(tld::exist("ru"));
assert!(tld::exist("de"));

assert!(!tld::exist(""));
assert!(!tld::exist("moc"));

assert!(tld::TLD.len() > 1400);

lib.rs:

TLD - top level domain static map, list is obtained from iana.org.

Crate provides a way to verify top level domain existence.

extern crate tld;

assert!(tld::exist("com"));
assert!(tld::exist("io"));
assert!(tld::exist("lt"));
assert!(tld::exist("ru"));
assert!(tld::exist("de"));

assert!(!tld::exist(""));
assert!(!tld::exist("moc"));

assert!(tld::TLD.len() > 1400);

Dependencies

~135KB