pub struct Header { /* private fields */ }👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
Expand description
A HTTP header
Implementations§
Source§impl Header
impl Header
Sourcepub const fn new(start_line: HeaderStartLine, fields: HeaderFields) -> Self
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub const fn new(start_line: HeaderStartLine, fields: HeaderFields) -> Self
Creates a new HTTP/1.1 header
Sourcepub fn start_line(&self) -> &HeaderStartLine
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub fn start_line(&self) -> &HeaderStartLine
The start line
Sourcepub fn start_line_mut(&mut self) -> &mut HeaderStartLine
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub fn start_line_mut(&mut self) -> &mut HeaderStartLine
The start line
Sourcepub fn fields(&self) -> &HeaderFields
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub fn fields(&self) -> &HeaderFields
The header fields
Sourcepub fn fields_mut(&mut self) -> &mut HeaderFields
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub fn fields_mut(&mut self) -> &mut HeaderFields
The header fields
Sourcepub fn read<T>(source: &mut T) -> Result<Self>where
T: BufRead,
👎Deprecated: This crate has been renamed to http_tiny; you’re using an outdated version
pub fn read<T>(source: &mut T) -> Result<Self>where
T: BufRead,
Loads a HTTP header from bytes and returns the remaining bytes
§Warning:
This function will read forever until there is either a \r\n\r\n or an EOF. To prevent DOS-attacks, it is
strongly recommended to wrap the source into an IoLimiter<T> to limit the amount of data
that will be read.
Trait Implementations§
Source§impl Ord for Header
impl Ord for Header
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Header
impl PartialOrd for Header
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 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