pub enum HttpBodyMode {
ContentLength(usize),
Chunked,
UntilEof,
Empty,
}Expand description
How the body following a response head should be read.
Variants§
ContentLength(usize)
Exactly n bytes follow.
Chunked
Transfer-Encoding: chunked framing follows.
UntilEof
Read until the connection is closed (no length, no chunking).
Empty
No body is expected. Not returned by body_mode; provided for callers
that classify bodies by status (e.g. 204/304) before reading.
Trait Implementations§
Source§impl Clone for HttpBodyMode
impl Clone for HttpBodyMode
Source§fn clone(&self) -> HttpBodyMode
fn clone(&self) -> HttpBodyMode
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 moreimpl Copy for HttpBodyMode
Source§impl Debug for HttpBodyMode
impl Debug for HttpBodyMode
impl Eq for HttpBodyMode
Source§impl PartialEq for HttpBodyMode
impl PartialEq for HttpBodyMode
Source§fn eq(&self, other: &HttpBodyMode) -> bool
fn eq(&self, other: &HttpBodyMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HttpBodyMode
Auto Trait Implementations§
impl Freeze for HttpBodyMode
impl RefUnwindSafe for HttpBodyMode
impl Send for HttpBodyMode
impl Sync for HttpBodyMode
impl Unpin for HttpBodyMode
impl UnsafeUnpin for HttpBodyMode
impl UnwindSafe for HttpBodyMode
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