Struct trillium_http::HeaderName
source · pub struct HeaderName<'a>(/* private fields */);
Expand description
The name of a http header. This can be either a
KnownHeaderName
or a string representation of an unknown
header.
Implementations§
source§impl<'a> HeaderName<'a>
impl<'a> HeaderName<'a>
sourcepub fn into_owned(self) -> HeaderName<'static>
pub fn into_owned(self) -> HeaderName<'static>
Convert a potentially-borrowed headername to a static headername by value.
sourcepub fn to_owned(&self) -> HeaderName<'static>
pub fn to_owned(&self) -> HeaderName<'static>
Convert a potentially-borrowed headername to a static
headername by cloning if needed from a borrow. If you have
ownership of a headername with a non-static lifetime, it is
preferable to use into_owned
. This is the equivalent of
self.clone().into_owned()
.
Trait Implementations§
source§impl AsRef<str> for HeaderName<'_>
impl AsRef<str> for HeaderName<'_>
source§impl<'a> Clone for HeaderName<'a>
impl<'a> Clone for HeaderName<'a>
source§fn clone(&self) -> HeaderName<'a>
fn clone(&self) -> HeaderName<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for HeaderName<'a>
impl<'a> Debug for HeaderName<'a>
source§impl Display for HeaderName<'_>
impl Display for HeaderName<'_>
source§impl<'a> From<&'a str> for HeaderName<'a>
impl<'a> From<&'a str> for HeaderName<'a>
source§impl From<KnownHeaderName> for HeaderName<'_>
impl From<KnownHeaderName> for HeaderName<'_>
source§fn from(khn: KnownHeaderName) -> Self
fn from(khn: KnownHeaderName) -> Self
Converts to this type from the input type.
source§impl From<String> for HeaderName<'static>
impl From<String> for HeaderName<'static>
source§impl FromStr for HeaderName<'static>
impl FromStr for HeaderName<'static>
source§impl<'a> Hash for HeaderName<'a>
impl<'a> Hash for HeaderName<'a>
source§impl PartialEq<HeaderName<'_>> for KnownHeaderName
impl PartialEq<HeaderName<'_>> for KnownHeaderName
source§fn eq(&self, other: &HeaderName<'_>) -> bool
fn eq(&self, other: &HeaderName<'_>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<KnownHeaderName> for &HeaderName<'_>
impl PartialEq<KnownHeaderName> for &HeaderName<'_>
source§fn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<KnownHeaderName> for HeaderName<'_>
impl PartialEq<KnownHeaderName> for HeaderName<'_>
source§fn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq for HeaderName<'a>
impl<'a> PartialEq for HeaderName<'a>
source§fn eq(&self, other: &HeaderName<'a>) -> bool
fn eq(&self, other: &HeaderName<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Eq for HeaderName<'a>
impl<'a> StructuralPartialEq for HeaderName<'a>
Auto Trait Implementations§
impl<'a> Freeze for HeaderName<'a>
impl<'a> RefUnwindSafe for HeaderName<'a>
impl<'a> Send for HeaderName<'a>
impl<'a> Sync for HeaderName<'a>
impl<'a> Unpin for HeaderName<'a>
impl<'a> UnwindSafe for HeaderName<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more