Struct trillium_client::HeaderName
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§
§impl<'a> HeaderName<'a>
impl<'a> HeaderName<'a>
pub fn into_owned(self) -> HeaderName<'static>
pub fn into_owned(self) -> HeaderName<'static>
Convert a potentially-borrowed headername to a static headername by value.
pub 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§
§impl AsRef<str> for HeaderName<'_>
impl AsRef<str> for HeaderName<'_>
§impl<'a> Clone for HeaderName<'a>
impl<'a> Clone for HeaderName<'a>
§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 more§impl<'a> Debug for HeaderName<'a>
impl<'a> Debug for HeaderName<'a>
§impl Display for HeaderName<'_>
impl Display for HeaderName<'_>
§impl<'a> From<&'a str> for HeaderName<'a>
impl<'a> From<&'a str> for HeaderName<'a>
§fn from(s: &'a str) -> HeaderName<'a>
fn from(s: &'a str) -> HeaderName<'a>
Converts to this type from the input type.
§impl From<KnownHeaderName> for HeaderName<'_>
impl From<KnownHeaderName> for HeaderName<'_>
§fn from(khn: KnownHeaderName) -> HeaderName<'_>
fn from(khn: KnownHeaderName) -> HeaderName<'_>
Converts to this type from the input type.
§impl From<String> for HeaderName<'static>
impl From<String> for HeaderName<'static>
§fn from(s: String) -> HeaderName<'static>
fn from(s: String) -> HeaderName<'static>
Converts to this type from the input type.
§impl<'a> From<UnknownHeaderName<'a>> for HeaderName<'a>
impl<'a> From<UnknownHeaderName<'a>> for HeaderName<'a>
§fn from(value: UnknownHeaderName<'a>) -> HeaderName<'a>
fn from(value: UnknownHeaderName<'a>) -> HeaderName<'a>
Converts to this type from the input type.
§impl FromStr for HeaderName<'static>
impl FromStr for HeaderName<'static>
§impl<'a> Hash for HeaderName<'a>
impl<'a> Hash for HeaderName<'a>
§impl PartialEq<HeaderName<'_>> for KnownHeaderName
impl PartialEq<HeaderName<'_>> for KnownHeaderName
§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 ==
.§impl PartialEq<KnownHeaderName> for &HeaderName<'_>
impl PartialEq<KnownHeaderName> for &HeaderName<'_>
§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 ==
.§impl PartialEq<KnownHeaderName> for HeaderName<'_>
impl PartialEq<KnownHeaderName> for HeaderName<'_>
§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 ==
.§impl<'a> PartialEq for HeaderName<'a>
impl<'a> PartialEq for HeaderName<'a>
§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> StructuralEq for HeaderName<'a>
impl<'a> StructuralPartialEq for HeaderName<'a>
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§
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
§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