pub struct ChunkDecoder { /* private fields */ }Expand description
Incremental decoder for a chunked request body and optional trailers.
Implementations§
Source§impl ChunkDecoder
impl ChunkDecoder
pub fn new(position: usize, limits: Limits) -> Self
Sourcepub fn advance(
&mut self,
buffer: &[u8],
) -> Result<Option<DecodedChunkedBody>, ParseError>
pub fn advance( &mut self, buffer: &[u8], ) -> Result<Option<DecodedChunkedBody>, ParseError>
Advances decoding over the caller’s accumulated receive buffer.
§Errors
Returns a protocol rejection for malformed chunks/trailers or configured body, trailer, and chunk-count limit violations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkDecoder
impl RefUnwindSafe for ChunkDecoder
impl Send for ChunkDecoder
impl Sync for ChunkDecoder
impl Unpin for ChunkDecoder
impl UnsafeUnpin for ChunkDecoder
impl UnwindSafe for ChunkDecoder
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