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]

[src]

Creates an empty List without any rules

Sometimes all you want is to do syntax checks. If you don't really care whether the domain has a known suffix or not you can just create an empty list and use that to parse domain names and email addresses.

[src]

Pull the list from a URL

[src]

Fetch the list from a local file

[src]

Build the list from the result of anything that implements std::io::Read

If you don't already have your list on the filesystem but want to use your own library to fetch the list you can use this method so you don't have to save it first.

[src]

Build the list from a string

The list doesn't always have to come from a file. You can maintain your own list, say in a DBMS. You can then pull it at runtime and build the list from the resulting String.

[src]

Build the list from a str

The list doesn't always have to come from a file. You can maintain your own list, say in a DBMS. You can then pull it at runtime and build the list from the resulting str.

[src]

Pull the list from the official URL

Important traits for Vec<u8>
[src]

Gets a list of all ICANN domain suffices

Important traits for Vec<u8>
[src]

Gets a list of all private domain suffices

Important traits for Vec<u8>
[src]

Gets a list of all domain suffices

[src]

Parses a domain using the list

[src]

Parses a host using the list

A host, for the purposes of this library, is either an IP address or a domain name.

[src]

Extracts Host from a URL

[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.

[src]

Parses any arbitrary string

Effectively this means that the string is either a URL, an email address or a host.

[src]

Parses any arbitrary string that can be used as a key in a DNS database

Trait Implementations

impl Debug for List
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for List

impl Sync for List