[][src]Struct domain_info::Domain

pub struct Domain(pub String);

A wrapper type around a domain

Examples

assert_eq!(Domain::from("google.com"),Ok(Domain(String::from("google.com"))));
assert_eq!(Domain::from("invalid"),Err(ScanError::Domain(String::from("invalid domain"))));

Errors

This function fails if the domain is not in a valid form. (TODO: add non-trivial domain validation.)

Methods

impl Domain[src]

Trait Implementations

impl Clone for Domain[src]

impl Debug for Domain[src]

impl<'de> Deserialize<'de> for Domain[src]

impl Display for Domain[src]

impl PartialEq<Domain> for Domain[src]

impl Scanner<DomainInfo> for Domain[src]

impl Serialize for Domain[src]

impl StructuralPartialEq for Domain[src]

Auto Trait Implementations

impl RefUnwindSafe for Domain

impl Send for Domain

impl Sync for Domain

impl Unpin for Domain

impl UnwindSafe for Domain

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,