#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

#583 in Data structures

Download history 230/week @ 2024-07-28 275/week @ 2024-08-04 153/week @ 2024-08-11 94/week @ 2024-08-18 58/week @ 2024-08-25 150/week @ 2024-09-01 68/week @ 2024-09-08 262/week @ 2024-09-15 608/week @ 2024-09-22 542/week @ 2024-09-29 377/week @ 2024-10-06 252/week @ 2024-10-13 101/week @ 2024-10-20 239/week @ 2024-10-27 176/week @ 2024-11-03 230/week @ 2024-11-10

754 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