pub struct Header { /* private fields */ }Available on crate feature
h2 and (crate features h2 or h3) only.Expand description
A header field name/value pair stored in or fetched from a table.
Implementations§
Source§impl Header
impl Header
Sourcepub fn new(name: impl Into<Bytes>, value: impl Into<Bytes>) -> Self
pub fn new(name: impl Into<Bytes>, value: impl Into<Bytes>) -> Self
Creates a header field from raw name/value bytes. Names are used
verbatim (no case normalization), which allows HTTP/2 pseudo
headers (:method, :status, …).
pub fn name(&self) -> &[u8] ⓘ
pub fn value(&self) -> &[u8] ⓘ
Trait Implementations§
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl !Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnsafeUnpin for Header
impl UnwindSafe for Header
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