pub enum LenientChunkedFraming {
Off,
RecoverUndercount,
RecoverOvercount,
RecoverBoth,
}Expand description
Controls whether the chunked framing decoder tolerates incorrect chunk sizes from the remote side.
Some routers send \n#<size>\n headers where <size> doesn’t match
the actual number of bytes before the next chunk boundary. When enabled,
the decoder scans for the real \n# boundary and adjusts the chunk
size accordingly.
Variants§
Off
Strict mode (default): trust the declared chunk size exactly.
RecoverUndercount
Recover when the declared size is smaller than the actual data (router undercounts).
RecoverOvercount
Recover when the declared size is larger than the actual data (router overcounts).
RecoverBoth
Recover from both undercount and overcount mismatches.
Trait Implementations§
Source§impl Clone for LenientChunkedFraming
impl Clone for LenientChunkedFraming
Source§fn clone(&self) -> LenientChunkedFraming
fn clone(&self) -> LenientChunkedFraming
Returns a duplicate of the value. Read more
1.0.0 · 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 LenientChunkedFraming
impl Debug for LenientChunkedFraming
Source§impl Default for LenientChunkedFraming
impl Default for LenientChunkedFraming
Source§fn default() -> LenientChunkedFraming
fn default() -> LenientChunkedFraming
Returns the “default value” for a type. Read more
Source§impl PartialEq for LenientChunkedFraming
impl PartialEq for LenientChunkedFraming
impl Copy for LenientChunkedFraming
impl Eq for LenientChunkedFraming
impl StructuralPartialEq for LenientChunkedFraming
Auto Trait Implementations§
impl Freeze for LenientChunkedFraming
impl RefUnwindSafe for LenientChunkedFraming
impl Send for LenientChunkedFraming
impl Sync for LenientChunkedFraming
impl Unpin for LenientChunkedFraming
impl UnsafeUnpin for LenientChunkedFraming
impl UnwindSafe for LenientChunkedFraming
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