[][src]Struct actix_web::http::uri::Scheme

pub struct Scheme { /* fields omitted */ }

Represents the scheme component of a URI

Methods

impl Scheme[src]

pub const HTTP: Scheme[src]

HTTP protocol scheme

pub const HTTPS: Scheme[src]

HTTP protocol over TLS.

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

Return a str representation of the scheme

Examples

let scheme: Scheme = "http".parse().unwrap();
assert_eq!(scheme.as_str(), "http");

Trait Implementations

impl AsRef<str> for Scheme[src]

impl Eq for Scheme[src]

impl Display for Scheme[src]

impl Debug for Scheme[src]

impl PartialEq<str> for Scheme[src]

Case-insensitive equality

Examples

let scheme: Scheme = "HTTP".parse().unwrap();
assert_eq!(scheme, *"http");

impl PartialEq<Scheme> for Scheme[src]

impl Clone for Scheme[src]

impl Hash for Scheme[src]

Case-insensitive hashing

impl<'a> TryFrom<&'a str> for Scheme[src]

type Error = InvalidUri

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a [u8]> for Scheme[src]

type Error = InvalidUri

The type returned in the event of a conversion error.

impl FromStr for Scheme[src]

type Err = InvalidUri

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Scheme

impl Sync for Scheme

impl Unpin for Scheme

impl UnwindSafe for Scheme

impl RefUnwindSafe for Scheme

Blanket Implementations

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 = !

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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