Enum trillium_http::ReceivedBodyState
source · [−]pub enum ReceivedBodyState {
Start,
Chunked {
remaining: usize,
total: usize,
},
FixedLength {
current_index: u64,
total_length: u64,
},
End,
}
Expand description
the current read state of this body
Variants
Start
initial state
Chunked
Fields
remaining: usize
remaining indicates the bytes left in the current chunk. initial state is zero.
total: usize
total indicates the size of the current chunk or zero to indicate that we expect to read a chunk size at the start of the next bytes. initial state is zero.
read state for a chunked-encoded body. the number of bytes that have been read from the current chunk is the difference between remaining and total.
FixedLength
Fields
current_index: u64
current index represents the bytes that have already been read. initial state is zero
total_length: u64
total length indicates the claimed length, usually determined by the content-length header
read state for a fixed-length body.
End
the terminal read state
Trait Implementations
sourceimpl Clone for ReceivedBodyState
impl Clone for ReceivedBodyState
sourcefn clone(&self) -> ReceivedBodyState
fn clone(&self) -> ReceivedBodyState
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ReceivedBodyState
impl Debug for ReceivedBodyState
sourceimpl Default for ReceivedBodyState
impl Default for ReceivedBodyState
sourceimpl PartialEq<ReceivedBodyState> for ReceivedBodyState
impl PartialEq<ReceivedBodyState> for ReceivedBodyState
sourcefn eq(&self, other: &ReceivedBodyState) -> bool
fn eq(&self, other: &ReceivedBodyState) -> bool
impl Copy for ReceivedBodyState
impl Eq for ReceivedBodyState
impl StructuralEq for ReceivedBodyState
impl StructuralPartialEq for ReceivedBodyState
Auto Trait Implementations
impl RefUnwindSafe for ReceivedBodyState
impl Send for ReceivedBodyState
impl Sync for ReceivedBodyState
impl Unpin for ReceivedBodyState
impl UnwindSafe for ReceivedBodyState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more