Crate tld

source ·
Expand description

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);

Statics§

  • Top level domain static map, list is obtained from iana.org.

Functions§

  • Convenience function to check if given TLD exists in IANA official TLD list.