Struct staticpublicsuffix::STATIC_SUFFIX_LIST
[−]
pub struct STATIC_SUFFIX_LIST { /* fields omitted */ }
Methods from __Deref<Target = List>
pub fn icann(&self) -> Vec<&str>
[src]
Gets a list of all ICANN domain suffices
pub fn private(&self) -> Vec<&str>
[src]
Gets a list of all private domain suffices
pub fn all(&self) -> Vec<&str>
[src]
Gets a list of all domain suffices
pub fn parse_domain(&self, domain: &str) -> Result<Domain, Error>
[src]
Parses a domain using the list
pub fn parse_host(&self, host: &str) -> Result<Host, Error>
[src]
Parses a host using the list
A host, for the purposes of this library, is either an IP address or a domain name.
pub fn parse_url<U>(&self, url: U) -> Result<Host, Error> where
U: IntoUrl,
[src]
U: IntoUrl,
Extracts Host from a URL
pub fn parse_email(&self, address: &str) -> Result<Host, Error>
[src]
Extracts Host from an email address
This method can also be used, simply to validate an email address. If it returns an error, the email address is not valid.
pub fn parse_str(&self, string: &str) -> Result<Host, Error>
[src]
Parses any arbitrary string
Effectively this means that the string is either a URL, an email address or a host.
pub fn parse_dns_name(&self, name: &str) -> Result<DnsName, Error>
[src]
Parses any arbitrary string that can be used as a key in a DNS database
Trait Implementations
impl __Deref for STATIC_SUFFIX_LIST
type Target = List
The resulting type after dereferencing.
fn deref(&self) -> &List
Dereferences the value.