pub struct SuffixList {
pub source: Source,
pub extra: Option<Source>,
pub public_suffixes: HashSet<String>,
pub private_suffixes: HashSet<String>,
pub disable_private_domains: bool,
pub expire: Option<Duration>,
pub last_update: Duration,
}
Expand description
Mainly implementing the resolution and classification of domain names
Fields§
§source: Source
Source Source
extra: Option<Source>
Extra source Source
public_suffixes: HashSet<String>
Custom append public_suffixes
private_suffixes: HashSet<String>
Custom append private_suffixes
disable_private_domains: bool
Whether to disable private domains
expire: Option<Duration>
Expiration time
last_update: Duration
Last update time
Implementations§
Source§impl SuffixList
impl SuffixList
Sourcepub fn new(
source: Source,
disable_private_domains: bool,
expire: Option<Duration>,
) -> Self
pub fn new( source: Source, disable_private_domains: bool, expire: Option<Duration>, ) -> Self
Creates a new SuffixList with source
Sourcepub fn private_domains(self, disable_private_domains: bool) -> Self
pub fn private_domains(self, disable_private_domains: bool) -> Self
set disable_private_domains
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if it has expired
Sourcepub fn build(&mut self) -> Result<TLDTrieTree>
pub fn build(&mut self) -> Result<TLDTrieTree>
build TLDTrieTree
Trait Implementations§
Source§impl Clone for SuffixList
impl Clone for SuffixList
Source§fn clone(&self) -> SuffixList
fn clone(&self) -> SuffixList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SuffixList
impl Debug for SuffixList
Source§impl Default for SuffixList
impl Default for SuffixList
Source§fn default() -> SuffixList
fn default() -> SuffixList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SuffixList
impl RefUnwindSafe for SuffixList
impl Send for SuffixList
impl Sync for SuffixList
impl Unpin for SuffixList
impl UnwindSafe for SuffixList
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