Struct tldextract::TldExtractor
source · [−]pub struct TldExtractor { /* private fields */ }
Expand description
The tld extractor, see TldOption for more docs.
Implementations
sourceimpl TldExtractor
impl TldExtractor
sourcepub fn new(option: TldOption) -> TldExtractor
pub fn new(option: TldOption) -> TldExtractor
Constructs a new TldExtractor
.
see TldOption for more docs.
sourcepub fn extract(&self, url: &str) -> Result<TldResult>
pub fn extract(&self, url: &str) -> Result<TldResult>
Extract (subdomain, domain, domain suffix) tuple from a given url or bare domain
sourcepub fn extract_naive(&self, url: &str) -> Result<TldResult>
pub fn extract_naive(&self, url: &str) -> Result<TldResult>
Extract (subdomain, domain, domain suffix) tuple from a given url or bare domain but override the universal naive_mode in TldExtractor.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TldExtractor
impl Send for TldExtractor
impl Sync for TldExtractor
impl Unpin for TldExtractor
impl UnwindSafe for TldExtractor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more