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

tld

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

53 stable releases

Uses old Rust 2015

2.36.0 Aug 6, 2024
2.35.0 Feb 17, 2024
2.34.0 Jan 31, 2024
2.33.0 Sep 6, 2023
0.2.0 Feb 21, 2017

#588 in Data structures

Download history 316/week @ 2024-08-02 159/week @ 2024-08-09 118/week @ 2024-08-16 55/week @ 2024-08-23 139/week @ 2024-08-30 84/week @ 2024-09-06 137/week @ 2024-09-13 587/week @ 2024-09-20 547/week @ 2024-09-27 424/week @ 2024-10-04 311/week @ 2024-10-11 138/week @ 2024-10-18 167/week @ 2024-10-25 242/week @ 2024-11-01 217/week @ 2024-11-08 153/week @ 2024-11-15

791 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