[][src]Struct iron::Url

pub struct Url { /* fields omitted */ }

HTTP/HTTPS URL type for Iron.

Methods

impl Url[src]

pub fn parse(input: &str) -> Result<Url, String>[src]

Create a URL from a string.

The input must be a valid URL with a special scheme for this to succeed.

HTTP and HTTPS are special schemes.

See: http://url.spec.whatwg.org/#special-scheme

pub fn from_generic_url(raw_url: Url) -> Result<Url, String>[src]

Create a Url from a rust-url Url.

pub fn into_generic_url(self) -> Url[src]

Deprecated since 0.4.1:

use into from the Into trait instead

Create a rust-url Url from a Url.

pub fn scheme(&self) -> &str[src]

The lower-cased scheme of the URL, typically "http" or "https".

pub fn host(&self) -> Host<&str>[src]

The host field of the URL, probably a domain.

pub fn port(&self) -> u16[src]

The connection port.

Important traits for Vec<u8>
pub fn path(&self) -> Vec<&str>[src]

The URL path, the resource to be accessed.

A non-empty vector encoding the parts of the URL path. Empty entries of "" correspond to trailing slashes.

pub fn username(&self) -> Option<&str>[src]

The URL username field, from the userinfo section of the URL.

None if the @ character was not part of the input OR if a blank username was provided. Otherwise, a non-empty string.

pub fn password(&self) -> Option<&str>[src]

The URL password field, from the userinfo section of the URL.

None if the @ character was not part of the input OR if a blank password was provided. Otherwise, a non-empty string.

pub fn query(&self) -> Option<&str>[src]

The URL query string.

None if the ? character was not part of the input. Otherwise, a possibly empty, percent encoded string.

pub fn fragment(&self) -> Option<&str>[src]

The URL fragment.

None if the # character was not part of the input. Otherwise, a possibly empty, percent encoded string.

Trait Implementations

impl AsMut<Url> for Url[src]

impl Clone for Url[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl AsRef<Url> for Url[src]

impl PartialEq<Url> for Url[src]

impl Into<Url> for Url[src]

impl Eq for Url[src]

impl Debug for Url[src]

impl Display for Url[src]

impl FromStr for Url[src]

type Err = String

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Unpin for Url

impl Sync for Url

impl Send for Url

impl UnwindSafe for Url

impl RefUnwindSafe for Url

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> UnsafeAny for T where
    T: Any