Struct Scheme

struct Scheme { ... }

Represents the scheme component of a URI

Implementations

impl Scheme

fn as_str(self: &Self) -> &str

Return a str representation of the scheme

Examples

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

impl AsRef for Scheme

fn as_ref(self: &Self) -> &str

impl Clone for Scheme

fn clone(self: &Self) -> Scheme

impl Debug for Scheme

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for Scheme

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for Scheme

impl Freeze for Scheme

impl FromStr for Scheme

fn from_str(s: &str) -> Result<Self, <Self as >::Err>

impl Hash for Scheme

fn hash<H>(self: &Self, state: &mut H)
where
    H: Hasher

impl PartialEq for Scheme

fn eq(self: &Self, other: &str) -> bool

impl PartialEq for Scheme

fn eq(self: &Self, other: &Scheme) -> bool

impl RefUnwindSafe for Scheme

impl Send for Scheme

impl Sync for Scheme

impl Unpin for Scheme

impl UnsafeUnpin for Scheme

impl UnwindSafe for Scheme

impl<'a> TryFrom for Scheme

fn try_from(s: &'a [u8]) -> Result<Self, <Self as >::Error>

impl<'a> TryFrom for Scheme

fn try_from(s: &'a str) -> Result<Self, <Self as >::Error>

impl<T> Any for Scheme

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Scheme

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Scheme

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Scheme

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Scheme

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Scheme

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for Scheme

fn to_string(self: &Self) -> String

impl<T, U> Into for Scheme

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Scheme

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Scheme

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>