Struct trillium_http::HeaderValue
source · [−]pub struct HeaderValue(_);
Expand description
A HeaderValue represents
Implementations
sourceimpl HeaderValue
impl HeaderValue
sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
Returns this header value as a &str if it is utf8, None
otherwise. If you need to convert non-utf8 bytes to a string
somehow, match directly on the HeaderValue as an enum and
handle that case. If you need a byte slice regardless of
whether it’s utf8, use the AsRef<[u8]>
impl
Trait Implementations
sourceimpl Clone for HeaderValue
impl Clone for HeaderValue
sourcefn clone(&self) -> HeaderValue
fn clone(&self) -> HeaderValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HeaderValue
impl Debug for HeaderValue
sourceimpl Display for HeaderValue
impl Display for HeaderValue
sourceimpl From<&'static [u8]> for HeaderValue
impl From<&'static [u8]> for HeaderValue
sourcefn from(b: &'static [u8]) -> Self
fn from(b: &'static [u8]) -> Self
Performs the conversion.
sourceimpl From<&'static str> for HeaderValue
impl From<&'static str> for HeaderValue
sourceimpl From<HeaderValue> for HeaderValues
impl From<HeaderValue> for HeaderValues
sourcefn from(v: HeaderValue) -> Self
fn from(v: HeaderValue) -> Self
Performs the conversion.
sourceimpl PartialEq<&'_ String> for HeaderValue
impl PartialEq<&'_ String> for HeaderValue
sourceimpl PartialEq<&'_ str> for HeaderValue
impl PartialEq<&'_ str> for HeaderValue
sourceimpl PartialEq<HeaderValue> for HeaderValue
impl PartialEq<HeaderValue> for HeaderValue
sourcefn eq(&self, other: &HeaderValue) -> bool
fn eq(&self, other: &HeaderValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HeaderValue) -> bool
fn ne(&self, other: &HeaderValue) -> bool
This method tests for !=
.
sourceimpl PartialEq<String> for HeaderValue
impl PartialEq<String> for HeaderValue
sourceimpl PartialEq<String> for &HeaderValue
impl PartialEq<String> for &HeaderValue
sourceimpl PartialEq<str> for HeaderValue
impl PartialEq<str> for HeaderValue
sourceimpl PartialEq<str> for &HeaderValue
impl PartialEq<str> for &HeaderValue
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more