pub struct HeaderField { /* private fields */ }
Expand description
Header field.
Implementations§
Source§impl HeaderField
impl HeaderField
Sourcepub const fn new(
name: HeaderFieldName,
value: Option<HeaderFieldValue>,
) -> HeaderField
pub const fn new( name: HeaderFieldName, value: Option<HeaderFieldValue>, ) -> HeaderField
Create a new header field.
Sourcepub fn name(&self) -> &HeaderFieldName
pub fn name(&self) -> &HeaderFieldName
Get the header field name.
Sourcepub fn value(&self) -> Option<&HeaderFieldValue>
pub fn value(&self) -> Option<&HeaderFieldValue>
Get the header field value (if any).
Sourcepub fn deconstruct(self) -> (HeaderFieldName, Option<HeaderFieldValue>)
pub fn deconstruct(self) -> (HeaderFieldName, Option<HeaderFieldValue>)
Deconstruct the header field into its components.
Trait Implementations§
Source§impl Clone for HeaderField
impl Clone for HeaderField
Source§fn clone(&self) -> HeaderField
fn clone(&self) -> HeaderField
Returns a duplicate 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 HeaderField
impl Debug for HeaderField
Source§impl<N> From<(N,)> for HeaderFieldwhere
N: Into<HeaderFieldName>,
impl<N> From<(N,)> for HeaderFieldwhere
N: Into<HeaderFieldName>,
Source§fn from(tuple: (N,)) -> HeaderField
fn from(tuple: (N,)) -> HeaderField
Converts to this type from the input type.
Source§impl<N, V> From<(N, V)> for HeaderField
impl<N, V> From<(N, V)> for HeaderField
Source§fn from(tuple: (N, V)) -> HeaderField
fn from(tuple: (N, V)) -> HeaderField
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for HeaderField
impl RefUnwindSafe for HeaderField
impl Send for HeaderField
impl Sync for HeaderField
impl Unpin for HeaderField
impl UnwindSafe for HeaderField
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