50 stable releases
Uses old Rust 2015
2.33.0 | Sep 6, 2023 |
---|---|
2.32.0 | Jul 21, 2023 |
2.30.0 | Nov 27, 2022 |
2.29.0 | Apr 24, 2022 |
0.2.0 | Feb 21, 2017 |
#427 in Rust patterns
152 downloads per month
47KB
1.5K
SLoC
tld 
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