Struct generic_async_http_client::HeaderName
source · pub struct HeaderName(/* private fields */);
Expand description
A HTTP Header Name
It can be converted from &[u8]
and &str
.
You can obtain &str
and &[u8]
references and compare with str.
let hn: HeaderName = "test".try_into().unwrap();
assert!(hn=="test");
let s: &str = hn.as_ref();
assert!(s.is_ascii());
let b: &[u8] = hn.as_ref();
assert!(b.contains(&b's'));
Trait Implementations§
source§impl AsRef<[u8]> for HeaderName
impl AsRef<[u8]> for HeaderName
source§impl AsRef<str> for HeaderName
impl AsRef<str> for HeaderName
source§impl Borrow<str> for HeaderName
impl Borrow<str> for HeaderName
source§impl Clone for HeaderName
impl Clone for HeaderName
source§fn clone(&self) -> HeaderName
fn clone(&self) -> HeaderName
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 Debug for HeaderName
impl Debug for HeaderName
source§impl Hash for HeaderName
impl Hash for HeaderName
source§impl PartialEq<&str> for HeaderName
impl PartialEq<&str> for HeaderName
source§impl PartialEq<str> for HeaderName
impl PartialEq<str> for HeaderName
source§impl PartialEq for HeaderName
impl PartialEq for HeaderName
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<'a> TryFrom<&'a [u8]> for HeaderName
impl<'a> TryFrom<&'a [u8]> for HeaderName
source§impl<'a> TryFrom<&'a str> for HeaderName
impl<'a> TryFrom<&'a str> for HeaderName
impl Eq for HeaderName
impl StructuralPartialEq for HeaderName
Auto Trait Implementations§
impl Freeze for HeaderName
impl RefUnwindSafe for HeaderName
impl Send for HeaderName
impl Sync for HeaderName
impl Unpin for HeaderName
impl UnwindSafe for HeaderName
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