Struct tldextract::TldResult[][src]

pub struct TldResult {
    pub domain: Option<String>,
    pub subdomain: Option<String>,
    pub suffix: Option<String>,
}

The Tld Result Type

E.g. "https://www.google.com" will be represent into

use tldextract::TldResult;

TldResult { domain: Some("google".to_string()), subdomain: Some("www".to_string()), suffix: Some("com".to_string())};

Fields

The "google" part of "www.google.com"

The "www" part of "www.google.com"

The "com" part of "www.google.com"

Methods

impl TldResult
[src]

Create a new TldResult

Examples

use tldextract::TldResult;
assert_eq!(TldResult::new("www", "google", "com"),
  TldResult {
    domain: Some("google".to_string()),
    subdomain: Some("www".to_string()),
    suffix: Some("com".to_string())
  });

Trait Implementations

impl Debug for TldResult
[src]

Formats the value using the given formatter. Read more

impl Default for TldResult
[src]

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

impl PartialEq for TldResult
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for TldResult
[src]

Auto Trait Implementations

impl Send for TldResult

impl Sync for TldResult