pub struct Headers(pub Vec<(String, String)>);Expand description
header lines; names compare case-insensitively
Tuple Fields§
§0: Vec<(String, String)>Implementations§
Source§impl Headers
impl Headers
pub fn new() -> Headers
pub fn get(&self, name: &str) -> Option<&str>
pub fn add(&mut self, name: &str, value: &str)
Sourcepub fn content_length(&self) -> Result<Option<u64>, ()>
pub fn content_length(&self) -> Result<Option<u64>, ()>
the Content-Length: Ok(None) without one, Err for a value that is not plain digits or headers that disagree
pub fn remove(&mut self, name: &str)
Trait Implementations§
impl Eq for Headers
impl StructuralPartialEq for Headers
Auto Trait Implementations§
impl Forget for Headers
impl Freeze for Headers
impl Move for Headers
impl RefUnwindSafe for Headers
impl Send for Headerswhere
RawVecInner: Send,
impl Sync for Headerswhere
RawVecInner: Sync,
impl Unpin for Headers
impl UnsafeUnpin for Headers
impl UnwindSafe for Headerswhere
RawVecInner: UnwindSafe,
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