Struct http_types::headers::HeaderValue [−][src]
pub struct HeaderValue { /* fields omitted */ }
A header value.
Implementations
impl HeaderValue
[src]
impl HeaderValue
[src]pub fn from_bytes(bytes: Vec<u8>) -> Result<Self, Error>
[src]
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>) -> Self
[src]
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
[src]
Get the header value as a &str
Trait Implementations
impl AsMut<HeaderValue> for HeaderValues
[src]
impl AsMut<HeaderValue> for HeaderValues
[src]fn as_mut(&mut self) -> &mut HeaderValue
[src]
impl AsRef<HeaderValue> for HeaderValues
[src]
impl AsRef<HeaderValue> for HeaderValues
[src]fn as_ref(&self) -> &HeaderValue
[src]
impl Clone for HeaderValue
[src]
impl Clone for HeaderValue
[src]fn clone(&self) -> HeaderValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for HeaderValue
[src]
impl Eq for HeaderValue
[src]impl From<CacheDirective> for HeaderValue
[src]
impl From<CacheDirective> for HeaderValue
[src]fn from(directive: CacheDirective) -> Self
[src]
impl From<EncodingProposal> for HeaderValue
[src]
impl From<EncodingProposal> for HeaderValue
[src]fn from(entry: EncodingProposal) -> HeaderValue
[src]
impl From<EncodingProposal> for HeaderValue
[src]
impl From<EncodingProposal> for HeaderValue
[src]fn from(entry: EncodingProposal) -> HeaderValue
[src]
impl From<HeaderValue> for HeaderValues
[src]
impl From<HeaderValue> for HeaderValues
[src]fn from(other: HeaderValue) -> Self
[src]
impl From<HeaderValues> for HeaderValue
[src]
impl From<HeaderValues> for HeaderValue
[src]fn from(other: HeaderValues) -> Self
[src]
impl From<MediaTypeProposal> for HeaderValue
[src]
impl From<MediaTypeProposal> for HeaderValue
[src]fn from(entry: MediaTypeProposal) -> HeaderValue
[src]
impl From<Metric> for HeaderValue
[src]
impl From<Metric> for HeaderValue
[src]fn from(entry: Metric) -> HeaderValue
[src]
impl FromIterator<HeaderValue> for HeaderValues
[src]
impl FromIterator<HeaderValue> for HeaderValues
[src]fn from_iter<I>(iter: I) -> HeaderValues where
I: IntoIterator<Item = HeaderValue>,
[src]
I: IntoIterator<Item = HeaderValue>,
impl FromStr for HeaderValue
[src]
impl FromStr for HeaderValue
[src]impl Hash for HeaderValue
[src]
impl Hash for HeaderValue
[src]impl<'a> PartialEq<&'_ String> for HeaderValue
[src]
impl<'a> PartialEq<&'_ String> for HeaderValue
[src]impl<'a> PartialEq<&'a str> for HeaderValue
[src]
impl<'a> PartialEq<&'a str> for HeaderValue
[src]impl PartialEq<HeaderValue> for HeaderValue
[src]
impl PartialEq<HeaderValue> for HeaderValue
[src]fn eq(&self, other: &HeaderValue) -> bool
[src]
fn ne(&self, other: &HeaderValue) -> bool
[src]
impl PartialEq<String> for HeaderValue
[src]
impl PartialEq<String> for HeaderValue
[src]impl PartialEq<str> for HeaderValue
[src]
impl PartialEq<str> for HeaderValue
[src]impl StructuralEq for HeaderValue
[src]
impl StructuralEq for HeaderValue
[src]impl StructuralPartialEq for HeaderValue
[src]
impl StructuralPartialEq for HeaderValue
[src]impl ToHeaderValues for HeaderValue
[src]
impl ToHeaderValues for HeaderValue
[src]type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
fn to_header_values(&self) -> Result<Self::Iter>
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeaderValue
impl RefUnwindSafe for HeaderValue
impl Send for HeaderValue
impl Send for HeaderValue
impl Sync for HeaderValue
impl Sync for HeaderValue
impl Unpin for HeaderValue
impl Unpin for HeaderValue
impl UnwindSafe for HeaderValue
impl UnwindSafe for HeaderValue
Blanket Implementations
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,