Struct publicsuffix::Domain[][src]

pub struct Domain { /* fields omitted */ }

Holds information about a particular domain

This is created by List::parse_domain.

Methods

impl Domain
[src]

Check if a domain has valid syntax

Gets the root domain portion if any

Gets the suffix if any

Whether the domain has a private suffix

Whether the domain has an ICANN suffix

Whether this domain's suffix is in the list

If it is, this is definately a valid domain. If it's not chances are very high that this isn't a valid domain name, however, it might simply be because the suffix is new and it hasn't been added to the list yet.

If you want to validate a domain name, use this as a quick check but fall back to a DNS lookup if it returns false.

Trait Implementations

impl Debug for Domain
[src]

Formats the value using the given formatter. Read more

impl Clone for Domain
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Domain
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Domain
[src]

impl Hash for Domain
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Domain
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Domain

impl Sync for Domain