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 reborrow<'b: 'a>(&'b self) -> HeaderName<'b>
pub fn reborrow<'b: 'a>(&'b self) -> HeaderName<'b>
Turn a &'b HeaderName<'a> into a HeaderName<'b>
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 duplicate 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 Debug for HeaderName<'_>
impl Debug for HeaderName<'_>
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<'a> Ord for HeaderName<'a>
impl<'a> Ord for HeaderName<'a>
Source§fn cmp(&self, other: &HeaderName<'a>) -> Ordering
fn cmp(&self, other: &HeaderName<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<&str> for HeaderName<'_>
impl PartialEq<&str> for HeaderName<'_>
Source§impl PartialEq<HeaderName<'_>> for KnownHeaderName
impl PartialEq<HeaderName<'_>> for KnownHeaderName
Source§impl PartialEq<KnownHeaderName> for &HeaderName<'_>
impl PartialEq<KnownHeaderName> for &HeaderName<'_>
Source§impl PartialEq<KnownHeaderName> for HeaderName<'_>
impl PartialEq<KnownHeaderName> for HeaderName<'_>
Source§impl PartialEq<str> for HeaderName<'_>
impl PartialEq<str> for HeaderName<'_>
Source§impl<'a> PartialEq for HeaderName<'a>
impl<'a> PartialEq for HeaderName<'a>
Source§impl<'a> PartialOrd for HeaderName<'a>
impl<'a> PartialOrd for HeaderName<'a>
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> UnsafeUnpin 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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.