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
sourceimpl<'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
sourceimpl AsRef<str> for HeaderName<'_>
impl AsRef<str> for HeaderName<'_>
sourceimpl<'a> Clone for HeaderName<'a>
impl<'a> Clone for HeaderName<'a>
sourcefn clone(&self) -> HeaderName<'a>
fn clone(&self) -> HeaderName<'a>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for HeaderName<'a>
impl<'a> Debug for HeaderName<'a>
sourceimpl Display for HeaderName<'_>
impl Display for HeaderName<'_>
sourceimpl<'a> From<&'a str> for HeaderName<'a>
impl<'a> From<&'a str> for HeaderName<'a>
sourceimpl From<KnownHeaderName> for HeaderName<'_>
impl From<KnownHeaderName> for HeaderName<'_>
sourcefn from(khn: KnownHeaderName) -> Self
fn from(khn: KnownHeaderName) -> Self
Converts to this type from the input type.
sourceimpl From<String> for HeaderName<'static>
impl From<String> for HeaderName<'static>
sourceimpl FromStr for HeaderName<'static>
impl FromStr for HeaderName<'static>
sourceimpl Hash for HeaderName<'_>
impl Hash for HeaderName<'_>
sourceimpl PartialEq<HeaderName<'_>> for HeaderName<'_>
impl PartialEq<HeaderName<'_>> for HeaderName<'_>
sourceimpl PartialEq<HeaderName<'_>> for KnownHeaderName
impl PartialEq<HeaderName<'_>> for KnownHeaderName
sourcefn eq(&self, other: &HeaderName<'_>) -> bool
fn eq(&self, other: &HeaderName<'_>) -> bool
sourceimpl PartialEq<KnownHeaderName> for &HeaderName<'_>
impl PartialEq<KnownHeaderName> for &HeaderName<'_>
sourcefn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
sourceimpl PartialEq<KnownHeaderName> for HeaderName<'_>
impl PartialEq<KnownHeaderName> for HeaderName<'_>
sourcefn eq(&self, other: &KnownHeaderName) -> bool
fn eq(&self, other: &KnownHeaderName) -> bool
impl Eq for HeaderName<'_>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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