Struct publicsuffix::List
[−]
[src]
pub struct List { /* fields omitted */ }
Stores the public suffix list
You can use the methods, fetch
, from_url
or from_path
to build the list.
If you are using this in a long running server it's recommended you use either
fetch
or from_url
to download updates at least once a week.
Methods
impl List
[src]
fn from_url<U: IntoUrl>(url: U) -> Result<List>
Pull the list from a URL
fn from_path<P: AsRef<Path>>(path: P) -> Result<List>
Fetch the list from a local file
fn fetch() -> Result<List>
Pull the list from the official URL
fn icann(&self) -> Vec<&String>
Gets a list of all ICANN domain suffices
fn private(&self) -> Vec<&String>
Gets a list of all private domain suffices
fn all(&self) -> Vec<&String>
Gets a list of all domain suffices
fn parse_domain(&self, domain: &str) -> Result<Domain>
Parses a domain using the list