Struct tldextract::TldOption [] [src]

pub struct TldOption {
    pub cache_path: Option<String>,
    pub private_domains: bool,
    pub update_local: bool,
    pub naive_mode: bool,
}

The option for TldExtractor.

Examples

use tldextract::{TldExtractor, TldOption, TldResult};

let option = TldOption {
   cache_path: Some(".tld_cache".to_string()),
   private_domains: false,
   update_local: false,
   naive_mode: false,
};

let ext = TldExtractor::new(option);

assert_eq!(ext.extract("https://m.facebook.com").unwrap(), TldResult::new("m", "facebook", "com"));

Fields

The path to file for storing tld cache

Whether to include private domains

Should tldextract update local cache file if the cache is fetched from remote or from snapshot

When cannot finding valid suffix in PSL, should we naively treat the last piece of URL as the suffix and the last but one piece as the domain?

Trait Implementations

impl Default for TldOption
[src]

[src]

Returns the "default value" for a type. Read more