Struct sig_proxy::middleware::proxy::prelude::headers::HeaderValue [−]
pub struct HeaderValue { /* fields omitted */ }
Expand description
A header value.
Implementations
impl HeaderValue
impl HeaderValue
pub fn from_bytes(bytes: Vec<u8, Global>) -> Result<HeaderValue, Error>
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
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.
Trait Implementations
impl AsMut<HeaderValue> for HeaderValues
impl AsMut<HeaderValue> for HeaderValues
pub fn as_mut(&mut self) -> &mut HeaderValue
pub fn as_mut(&mut self) -> &mut HeaderValue
Performs the conversion.
impl AsRef<HeaderValue> for HeaderValues
impl AsRef<HeaderValue> for HeaderValues
pub fn as_ref(&self) -> &HeaderValue
pub fn as_ref(&self) -> &HeaderValue
Performs the conversion.
impl Clone for HeaderValue
impl Clone for HeaderValue
pub fn clone(&self) -> HeaderValue
pub fn clone(&self) -> HeaderValue
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for HeaderValue
impl Debug for HeaderValue
impl Display for HeaderValue
impl Display for HeaderValue
impl<'_> From<&'_ Mime> for HeaderValue
impl<'_> From<&'_ Mime> for HeaderValue
pub fn from(mime: &Mime) -> HeaderValue
pub fn from(mime: &Mime) -> HeaderValue
Performs the conversion.
impl From<CacheDirective> for HeaderValue
impl From<CacheDirective> for HeaderValue
pub fn from(directive: CacheDirective) -> HeaderValue
pub fn from(directive: CacheDirective) -> HeaderValue
Performs the conversion.
impl<'_> From<Cookie<'_>> for HeaderValue
impl<'_> From<Cookie<'_>> for HeaderValue
pub fn from(cookie: Cookie<'_>) -> HeaderValue
pub fn from(cookie: Cookie<'_>) -> HeaderValue
Performs the conversion.
impl From<Encoding> for HeaderValue
impl From<Encoding> for HeaderValue
pub fn from(directive: Encoding) -> HeaderValue
pub fn from(directive: Encoding) -> HeaderValue
Performs the conversion.
impl From<Encoding> for HeaderValue
impl From<Encoding> for HeaderValue
pub fn from(directive: Encoding) -> HeaderValue
pub fn from(directive: Encoding) -> HeaderValue
Performs the conversion.
impl From<EncodingProposal> for HeaderValue
impl From<EncodingProposal> for HeaderValue
pub fn from(entry: EncodingProposal) -> HeaderValue
pub fn from(entry: EncodingProposal) -> HeaderValue
Performs the conversion.
impl From<EncodingProposal> for HeaderValue
impl From<EncodingProposal> for HeaderValue
pub fn from(entry: EncodingProposal) -> HeaderValue
pub fn from(entry: EncodingProposal) -> HeaderValue
Performs the conversion.
impl From<HeaderValue> for HeaderValues
impl From<HeaderValue> for HeaderValues
pub fn from(other: HeaderValue) -> HeaderValues
pub fn from(other: HeaderValue) -> HeaderValues
Performs the conversion.
impl From<HeaderValues> for HeaderValue
impl From<HeaderValues> for HeaderValue
pub fn from(other: HeaderValues) -> HeaderValue
pub fn from(other: HeaderValues) -> HeaderValue
Performs the conversion.
impl From<MediaTypeProposal> for HeaderValue
impl From<MediaTypeProposal> for HeaderValue
pub fn from(entry: MediaTypeProposal) -> HeaderValue
pub fn from(entry: MediaTypeProposal) -> HeaderValue
Performs the conversion.
impl From<Metric> for HeaderValue
impl From<Metric> for HeaderValue
pub fn from(entry: Metric) -> HeaderValue
pub fn from(entry: Metric) -> HeaderValue
Performs the conversion.
impl From<Mime> for HeaderValue
impl From<Mime> for HeaderValue
pub fn from(mime: Mime) -> HeaderValue
pub fn from(mime: Mime) -> HeaderValue
Performs the conversion.
impl FromIterator<HeaderValue> for HeaderValues
impl FromIterator<HeaderValue> for HeaderValues
pub fn from_iter<I>(iter: I) -> HeaderValues where
I: IntoIterator<Item = HeaderValue>,
pub fn from_iter<I>(iter: I) -> HeaderValues where
I: IntoIterator<Item = HeaderValue>,
Creates a value from an iterator. Read more
impl FromStr for HeaderValue
impl FromStr for HeaderValue
pub fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
pub fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
Create a new HeaderValue
.
This checks it’s valid ASCII.
type Err = Error
type Err = Error
The associated error which can be returned from parsing.
impl Hash for HeaderValue
impl Hash for HeaderValue
impl<'a, '_> PartialEq<&'_ String> for HeaderValue
impl<'a, '_> PartialEq<&'_ String> for HeaderValue
impl<'a> PartialEq<&'a str> for HeaderValue
impl<'a> PartialEq<&'a str> for HeaderValue
impl PartialEq<HeaderValue> for HeaderValue
impl PartialEq<HeaderValue> for HeaderValue
pub fn eq(&self, other: &HeaderValue) -> bool
pub fn eq(&self, other: &HeaderValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &HeaderValue) -> bool
pub fn ne(&self, other: &HeaderValue) -> bool
This method tests for !=
.
impl PartialEq<String> for HeaderValue
impl PartialEq<String> for HeaderValue
impl PartialEq<str> for HeaderValue
impl PartialEq<str> for HeaderValue
impl ToHeaderValues for HeaderValue
impl ToHeaderValues for HeaderValue
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
pub fn to_header_values(
&self
) -> Result<<HeaderValue as ToHeaderValues>::Iter, Error>
pub fn to_header_values(
&self
) -> Result<<HeaderValue as ToHeaderValues>::Iter, Error>
Converts this object to an iterator of resolved HeaderValues
.
impl<'a> TryFrom<&'a str> for HeaderValue
impl<'a> TryFrom<&'a str> for HeaderValue
type Error = Error
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(
value: &'a str
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a str>>::Error>
pub fn try_from(
value: &'a str
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a str>>::Error>
Performs the conversion.
impl Eq for HeaderValue
impl StructuralEq for HeaderValue
impl StructuralPartialEq for HeaderValue
Auto Trait Implementations
impl RefUnwindSafe for HeaderValue
impl Send for HeaderValue
impl Sync for HeaderValue
impl Unpin for HeaderValue
impl UnwindSafe for HeaderValue
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,