pub enum HeadOutcome {
Head(Vec<u8>),
TooLarge,
Eof,
Truncated(Vec<u8>),
}Expand description
The outcome of reading an HTTP head up to the \r\n\r\n terminator.
Variants§
Head(Vec<u8>)
A complete head terminated by \r\n\r\n, returned as raw bytes
(terminator included) for the caller to parse.
TooLarge
The head reached cap bytes before the terminator; the caller rejects it.
Eof
End of input before any byte was read: the peer opened and closed without sending a request.
Truncated(Vec<u8>)
End of input after a partial head: the connection was truncated mid-headers. Carries the bytes read so far.
Trait Implementations§
Source§impl Clone for HeadOutcome
impl Clone for HeadOutcome
Source§fn clone(&self) -> HeadOutcome
fn clone(&self) -> HeadOutcome
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 HeadOutcome
impl Debug for HeadOutcome
impl Eq for HeadOutcome
Source§impl PartialEq for HeadOutcome
impl PartialEq for HeadOutcome
impl StructuralPartialEq for HeadOutcome
Auto Trait Implementations§
impl Freeze for HeadOutcome
impl RefUnwindSafe for HeadOutcome
impl Send for HeadOutcome
impl Sync for HeadOutcome
impl Unpin for HeadOutcome
impl UnsafeUnpin for HeadOutcome
impl UnwindSafe for HeadOutcome
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