pub struct MessageHeaders { /* private fields */ }Expand description
Header collection for a message.
Implementations§
Source§impl MessageHeaders
impl MessageHeaders
Sourcepub const fn new() -> MessageHeaders
pub const fn new() -> MessageHeaders
Creates an empty message-header collection.
Sourcepub fn with_field(self, field: HeaderField) -> MessageHeaders
pub fn with_field(self, field: HeaderField) -> MessageHeaders
Adds a header field and returns the updated collection.
Sourcepub fn push(&mut self, field: HeaderField)
pub fn push(&mut self, field: HeaderField)
Appends a field.
Sourcepub fn fields(&self) -> &[HeaderField]
pub fn fields(&self) -> &[HeaderField]
Returns fields.
Sourcepub fn first_value(&self, name: &str) -> Option<&str>
pub fn first_value(&self, name: &str) -> Option<&str>
Finds the first header value by case-insensitive name.
Trait Implementations§
Source§impl Clone for MessageHeaders
impl Clone for MessageHeaders
Source§fn clone(&self) -> MessageHeaders
fn clone(&self) -> MessageHeaders
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 MessageHeaders
impl Debug for MessageHeaders
Source§impl Default for MessageHeaders
impl Default for MessageHeaders
Source§fn default() -> MessageHeaders
fn default() -> MessageHeaders
Returns the “default value” for a type. Read more
Source§impl Display for MessageHeaders
impl Display for MessageHeaders
Source§impl PartialEq for MessageHeaders
impl PartialEq for MessageHeaders
Source§fn eq(&self, other: &MessageHeaders) -> bool
fn eq(&self, other: &MessageHeaders) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MessageHeaders
impl StructuralPartialEq for MessageHeaders
Auto Trait Implementations§
impl Freeze for MessageHeaders
impl RefUnwindSafe for MessageHeaders
impl Send for MessageHeaders
impl Sync for MessageHeaders
impl Unpin for MessageHeaders
impl UnsafeUnpin for MessageHeaders
impl UnwindSafe for MessageHeaders
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