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.

impl Clone for Domain
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Domain
[src]

Formats the value using the given formatter.