pub enum CompressionState {
Disabled,
Pending {
buffer: Vec<u8>,
encoding: CompressionEncoding,
},
Complete,
}Expand description
Tracks compression middleware state across body chunks
Variants§
Disabled
Compression disabled for this response
Pending
Compression enabled and buffering body chunks
Complete
Compression already applied
Implementations§
Source§impl CompressionState
impl CompressionState
pub fn enable(&mut self, encoding: CompressionEncoding)
pub fn is_enabled(&self) -> bool
Trait Implementations§
Source§impl Debug for CompressionState
impl Debug for CompressionState
Source§impl Default for CompressionState
impl Default for CompressionState
Source§fn default() -> CompressionState
fn default() -> CompressionState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompressionState
impl RefUnwindSafe for CompressionState
impl Send for CompressionState
impl Sync for CompressionState
impl Unpin for CompressionState
impl UnwindSafe for CompressionState
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