Struct sig_proxy::middleware::proxy::prelude::headers::HeaderValue[]

pub struct HeaderValue { /* fields omitted */ }

A header value.

Implementations

impl HeaderValue

pub fn from_bytes(bytes: Vec<u8, Global>) -> Result<HeaderValue, Error>

Create a new HeaderValue from a Vec of ASCII bytes.

Error

This function will error if the bytes is not valid ASCII.

pub unsafe fn from_bytes_unchecked(bytes: Vec<u8, Global>) -> HeaderValue

Converts a vector of bytes to a HeaderValue without checking that the string contains valid ASCII.

Safety

This function is unsafe because it does not check that the bytes passed to it are valid ASCII. If this constraint is violated, it may cause memory unsafety issues with future users of the HeaderValue, as the rest of the library assumes that Strings are valid ASCII.

pub fn as_str(&self) -> &str

Get the header value as a &str

Trait Implementations

impl AsMut<HeaderValue> for HeaderValues

impl AsRef<HeaderValue> for HeaderValues

impl Clone for HeaderValue

impl Debug for HeaderValue

impl Display for HeaderValue

impl Eq for HeaderValue

impl<'_> From<&'_ Mime> for HeaderValue

impl From<CacheDirective> for HeaderValue

impl<'_> From<Cookie<'_>> for HeaderValue

impl From<Encoding> for HeaderValue

impl From<Encoding> for HeaderValue

impl From<EncodingProposal> for HeaderValue

impl From<EncodingProposal> for HeaderValue

impl From<HeaderValue> for HeaderValues

impl From<HeaderValues> for HeaderValue

impl From<MediaTypeProposal> for HeaderValue

impl From<Metric> for HeaderValue

impl From<Mime> for HeaderValue

impl FromIterator<HeaderValue> for HeaderValues

impl FromStr for HeaderValue

type Err = Error

The associated error which can be returned from parsing.

pub fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>

Create a new HeaderValue.

This checks it’s valid ASCII.

impl Hash for HeaderValue

impl<'a, '_> PartialEq<&'_ String> for HeaderValue

impl<'a> PartialEq<&'a str> for HeaderValue

impl PartialEq<HeaderValue> for HeaderValue

impl PartialEq<String> for HeaderValue

impl PartialEq<str> for HeaderValue

impl StructuralEq for HeaderValue

impl StructuralPartialEq for HeaderValue

impl ToHeaderValues for HeaderValue

type Iter = IntoIter<HeaderValue>

Returned iterator over header values which this type may correspond to.

impl<'a> TryFrom<&'a str> for HeaderValue

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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 = 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]