pub struct Domain<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> Domain<'a>
impl<'a> Domain<'a>
Sourcepub fn as_str(&self) -> &'a str
pub fn as_str(&self) -> &'a str
The hostname this was derived from (the input minus any trailing dot).
Sourcepub fn suffix(&self) -> &'a str
pub fn suffix(&self) -> &'a str
The public suffix (“effective TLD”), e.g. co.uk for
www.example.co.uk.
Sourcepub fn registrable_domain(&self) -> Option<&'a str>
pub fn registrable_domain(&self) -> Option<&'a str>
The registrable domain (public suffix plus one more label), e.g.
example.co.uk. This is the domain that can set cookies.
None when the input is itself a public suffix.
Sourcepub fn subdomain(&self) -> Option<&'a str>
pub fn subdomain(&self) -> Option<&'a str>
The subdomain: the labels left of the registrable domain, e.g. www
for www.example.co.uk. None if there is none.
Sourcepub fn is_public_suffix(&self) -> bool
pub fn is_public_suffix(&self) -> bool
true if the input is itself a public suffix (no registrable domain).
Sourcepub fn typ(&self) -> Option<Type>
pub fn typ(&self) -> Option<Type>
The section of the matched rule, or None for the implicit default
rule (an unknown TLD).
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
true if the suffix matched a rule in the PRIVATE section.
Trait Implementations§
impl<'a> Copy for Domain<'a>
impl<'a> Eq for Domain<'a>
impl<'a> StructuralPartialEq for Domain<'a>
Auto Trait Implementations§
impl<'a> Freeze for Domain<'a>
impl<'a> RefUnwindSafe for Domain<'a>
impl<'a> Send for Domain<'a>
impl<'a> Sync for Domain<'a>
impl<'a> Unpin for Domain<'a>
impl<'a> UnsafeUnpin for Domain<'a>
impl<'a> UnwindSafe for Domain<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more