pub struct Scheme { /* private fields */ }
Expand description
Represents the scheme component of a URI
Implementations
Trait Implementations
sourceimpl FromStr for Scheme
impl FromStr for Scheme
type Err = InvalidUri
type Err = InvalidUri
The associated error which can be returned from parsing.
sourceimpl Hash for Scheme
impl Hash for Scheme
Case-insensitive hashing
sourcefn hash<H>(&self, state: &mut H)where
H: Hasher,
fn hash<H>(&self, state: &mut H)where
H: Hasher,
Feeds this value into the given [
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Feeds a slice of this type into the given [
Hasher
]. Read moresourceimpl PartialEq<Scheme> for str
impl PartialEq<Scheme> for str
Case-insensitive equality
sourceimpl PartialEq<str> for Scheme
impl PartialEq<str> for Scheme
Case-insensitive equality
Examples
let scheme: Scheme = "HTTP".parse().unwrap();
assert_eq!(scheme, *"http");
sourceimpl<'a> TryFrom<&'a [u8]> for Scheme
impl<'a> TryFrom<&'a [u8]> for Scheme
type Error = InvalidUri
type Error = InvalidUri
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a str> for Scheme
impl<'a> TryFrom<&'a str> for Scheme
type Error = InvalidUri
type Error = InvalidUri
The type returned in the event of a conversion error.
impl Eq for Scheme
Auto Trait Implementations
impl RefUnwindSafe for Scheme
impl Send for Scheme
impl Sync for Scheme
impl Unpin for Scheme
impl UnwindSafe for Scheme
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more