pub struct List { /* private fields */ }Expand description
Stores the public suffix list
Implementations§
Source§impl List
impl List
Sourcepub fn from_reader<R: Read>(reader: R) -> Result<List>
pub fn from_reader<R: Read>(reader: R) -> Result<List>
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.
Sourcepub fn parse_domain(&self, domain: &str) -> Result<DnsName>
pub fn parse_domain(&self, domain: &str) -> Result<DnsName>
Parses a domain using the list (API backwards compat)
Sourcepub fn parse_dns_name(&self, domain: &str) -> Result<DnsName>
pub fn parse_dns_name(&self, domain: &str) -> Result<DnsName>
Parses a DNS name using the list
Trait Implementations§
Auto Trait Implementations§
impl Freeze for List
impl RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnwindSafe for List
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