Crate psl_utils

Crate psl_utils 

Source

Functions§

domain_is_known
Check whether the registrable domain’s public suffix is explicitly present in the public suffix list. Returns false when the input has no registrable domain. The caller is expected to pass an already-normalized domain (typically via normalize_domain).
domain_str
Look up the organizational (registrable) domain. The caller is expected to pass an already-normalized domain (typically via normalize_domain); the returned slice borrows from s.
normalize_domain
Normalize a domain for use with domain_str / suffix_str: strip a single trailing dot (FQDN form) and lowercase any ASCII upper bytes. Borrows when the input is already normalized; only allocates when uppercase bytes are present.
suffix_is_known
Check whether the public suffix is explicitly present in the public suffix list (as opposed to being resolved via the fallback rule for an unknown top-level domain). Returns false when the input has no public suffix. The caller is expected to pass an already-normalized domain (typically via normalize_domain).
suffix_str
Look up the public suffix. The caller is expected to pass an already-normalized domain (typically via normalize_domain); the returned slice borrows from s.