Struct psl_types::Suffix[][src]

pub struct Suffix<'a> { /* fields omitted */ }

The suffix of a domain name


impl Suffix<'_>[src]

pub fn new(bytes: &[u8], typ: Option<Type>) -> Suffix<'_>[src]

Builds a new suffix

pub const fn as_bytes(&self) -> &[u8][src]

The suffix as bytes

pub const fn is_fqdn(&self) -> bool[src]

Whether or not the suffix is fully qualified (i.e. it ends with a .)

pub const fn typ(&self) -> Option<Type>[src]

Whether this is an ICANN, private or unknown suffix

pub fn trim(self) -> Self[src]

Returns the suffix with a trailing . removed

pub fn is_known(&self) -> bool[src]

Whether or not this is a known suffix (i.e. it is explicitly in the public suffix list)

Trait Implementations

impl<'a> Clone for Suffix<'a>[src]

impl<'a> Copy for Suffix<'a>[src]

impl<'a> Debug for Suffix<'a>[src]

impl<'a> Eq for Suffix<'a>[src]

impl Hash for Suffix<'_>[src]

impl Ord for Suffix<'_>[src]

impl PartialEq<&'_ [u8]> for Suffix<'_>[src]

impl PartialEq<&'_ str> for Suffix<'_>[src]

impl PartialEq<Suffix<'_>> for Suffix<'_>[src]

impl PartialOrd<Suffix<'_>> for Suffix<'_>[src]

impl<'a> StructuralEq for Suffix<'a>[src]

Auto Trait Implementations

impl<'a> Send for Suffix<'a>

impl<'a> Sync for Suffix<'a>

impl<'a> Unpin for Suffix<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.