[][src]Struct http_header::data::Data

pub struct Data<E: Encoding> { /* fields omitted */ }

Some data that conforms to a specific encoding

Methods

impl<E: Encoding> Data<E>[src]

pub fn try_from_superset<S: Encoding>(
    superset: Data<S>
) -> Result<Self, HttpError> where
    E: SubsetOf<S>, 
[src]

Tries to create self from data with a superset encoding

pub fn from_subset<S: Encoding>(subset: Data<S>) -> Self where
    S: SubsetOf<E>, 
[src]

Creates self from data with a subset encoding

impl<E: Encoding> Data<E>[src]

pub fn validate(bytes: &[u8]) -> bool[src]

Validates that bytes conform to the encoding M

Trait Implementations

impl<E: Encoding> AsRef<[u8]> for Data<E>[src]

impl<E: Encoding + SubsetOf<Utf8>> AsRef<str> for Data<E>[src]

impl<E: Encoding> Eq for Data<E>[src]

impl<E: Clone + Encoding> Clone for Data<E>[src]

impl<E: Encoding> PartialEq<Data<E>> for Data<E>[src]

impl<E: Encoding> PartialEq<str> for Data<E>[src]

impl<E: Encoding> PartialEq<Data<E>> for str[src]

impl<E: Encoding> From<Data<E>> for Vec<u8>[src]

impl<E: Encoding> Hash for Data<E>[src]

impl<E: Encoding> Deref for Data<E>[src]

type Target = [u8]

The resulting type after dereferencing.

impl<E: Encoding + SubsetOf<Utf8>> Display for Data<E>[src]

impl<E: Debug + Encoding> Debug for Data<E>[src]

impl TryFrom<Data<Uri>> for QueryString[src]

type Error = HttpError

The type returned in the event of a conversion error.

impl<'_, E: Encoding> TryFrom<&'_ str> for Data<E>[src]

type Error = HttpError

The type returned in the event of a conversion error.

impl<'_, E: Encoding> TryFrom<&'_ [u8]> for Data<E>[src]

type Error = HttpError

The type returned in the event of a conversion error.

impl<E: Encoding> TryFrom<String> for Data<E>[src]

type Error = HttpError

The type returned in the event of a conversion error.

impl<E: Encoding> TryFrom<Vec<u8>> for Data<E>[src]

type Error = HttpError

The type returned in the event of a conversion error.

impl TryFrom<Data<Integer>> for u128[src]

type Error = ParseIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<Data<Integer>> for u16[src]

type Error = ParseIntError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<E> Sync for Data<E> where
    E: Sync

impl<E> Send for Data<E> where
    E: Send

impl<E> Unpin for Data<E> where
    E: Unpin

impl<E> UnwindSafe for Data<E> where
    E: UnwindSafe

impl<E> RefUnwindSafe for Data<E> where
    E: RefUnwindSafe

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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