pub struct HeaderName<'a>(/* private fields */);Expand description
Borrowed, validated HTTP header name.
Implementations§
Source§impl<'a> HeaderName<'a>
impl<'a> HeaderName<'a>
Sourcepub fn new(value: &'a str) -> Result<Self, HeaderError>
pub fn new(value: &'a str) -> Result<Self, HeaderError>
Validates an HTTP field name without normalizing its bytes.
Sourcepub fn eq_ignore_ascii_case(self, other: &str) -> bool
pub fn eq_ignore_ascii_case(self, other: &str) -> bool
Compares two names using HTTP’s ASCII case-insensitive semantics.
Trait Implementations§
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for HeaderName<'a>
Source§impl Debug for HeaderName<'_>
impl Debug for HeaderName<'_>
impl Eq for HeaderName<'_>
Source§impl Hash for HeaderName<'_>
impl Hash for HeaderName<'_>
Source§impl Ord for HeaderName<'_>
impl Ord for HeaderName<'_>
1.21.0 (const: unstable) · 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 for HeaderName<'_>
impl PartialEq for HeaderName<'_>
Source§impl PartialOrd for HeaderName<'_>
impl PartialOrd for HeaderName<'_>
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