Struct trillium_http::HeaderName
source · pub struct HeaderName<'a>(_);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 Hash for HeaderName<'_>
impl Hash for HeaderName<'_>
source§impl PartialEq<HeaderName<'_>> for HeaderName<'_>
impl PartialEq<HeaderName<'_>> for HeaderName<'_>
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 ==.