[][src]Struct nano_get::Url

pub struct Url {
    pub protocol: String,
    pub host: String,
    pub port: String,
    pub path: String,
    // some fields omitted
}

This is used to represent the various parts of a URL.

Fields

protocol: String

represents the protocol used in the URL (defaults to http).

host: String

represents the Host part of the URL.

port: String

represents the port of the URL (if specified). Default is port 80 for http.

path: String

everything after the / (/ is the default value).

Methods

impl Url[src]

pub fn new(url: &str) -> Self[src]

pub fn get_full_url(&self) -> String[src]

returns the complete url (which was used to create the URL).

pub fn get_host_with_port(&self) -> String[src]

returns the host:port of the url.

Trait Implementations

impl Clone for Url[src]

impl Debug for Url[src]

impl Display for Url[src]

impl ToUrl for Url[src]

impl<'_> ToUrl for &'_ Url[src]

Auto Trait Implementations

impl RefUnwindSafe for Url

impl Send for Url

impl Sync for Url

impl Unpin for Url

impl UnwindSafe for Url

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