pub struct HeaderName(/* private fields */);Expand description
A validated HTTP header name.
Implementations§
Source§impl HeaderName
impl HeaderName
Sourcepub fn new(name: impl Into<String>) -> Result<Self, HeaderError>
pub fn new(name: impl Into<String>) -> Result<Self, HeaderError>
Create a validated header name.
§Errors
Returns HeaderError::InvalidName if the name is empty or contains
characters outside the visible ASCII range (0x21–0x7E excluding
separators).
Trait Implementations§
Source§impl Clone for HeaderName
impl Clone for HeaderName
Source§fn clone(&self) -> HeaderName
fn clone(&self) -> HeaderName
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 moreSource§impl Debug for HeaderName
impl Debug for HeaderName
Source§impl Display for HeaderName
impl Display for HeaderName
impl Eq for HeaderName
Source§impl Hash for HeaderName
impl Hash for HeaderName
Source§impl PartialEq for HeaderName
impl PartialEq 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 UnsafeUnpin 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