gtld-data.rs
Rust crate for gTLD data with a few useful functions. The list of gTLDs is created/updated on build of the library.
All renames, additions, and removals of gTLD's are due to the IANA removing their entries.
All API changes are subject to Semver.
gTLD
A Generic Top Level Domain (gTLD) is an internet domain name extension with three or more characters. It is one of the categories of the top level domain (TLD) in the Domain Name System (DNS) maintained by the Internet Assigned Numbers Authority.
-- icannwiki
Installation
Add the following dependency to your Cargo.toml:
gtld-data = "^0.4"
And include it in your project:
extern crate gtld_data;
Examples
Retrieve a Vec
of all Gtld
definitions:
let gtlds = all;
Check if a domain for a Gtld
exists:
use domain_exists;
let exists = domain_exists;
Retrieve a Vec
of Gtld
s based on a given GtldKind
:
use ;
let generics = get_by_kind;
assert!;
Retrieve a Vec
of Gtld
s based on the name of the organization passed:
use get_by_organization;
let organization = "VeriSign Global Registry Services";
let gtlds = get_by_organization;
assert!;
License
License info in LICENSE.md. Long story short, ISC.