[][src]Enum sitemap::structs::Location

pub enum Location {
    None,
    Url(Url),
    ParseErr(ParseError),
}

Url location.

Variants

None

No value.

Url(Url)

Url

ParseErr(ParseError)

Url parse error.

Implementations

impl Location[src]

pub fn get_url(&self) -> Option<Url>[src]

Returns url if present.

pub fn is_url(&self) -> bool[src]

Checks is location equals url

pub fn is_none(&self) -> bool[src]

Checks is location equals none

pub fn is_parse_error(&self) -> bool[src]

Checks is location contains parse error.

Trait Implementations

impl Clone for Location[src]

impl Debug for Location[src]

impl From<String> for Location[src]

fn from(url: String) -> Self[src]

Parses Url from string.

impl From<Url> for Location[src]

fn from(url: Url) -> Self[src]

Wraps a Url into a Location enum

Auto Trait Implementations

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> 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, 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.