pub struct Decoder { /* private fields */ }Implementations§
Source§impl Decoder
impl Decoder
pub const DEFAULT_MAX_BODY: usize = MAX_BODY_SIZE
pub fn new() -> Self
pub fn with_limit(max_body: usize) -> Self
Sourcepub fn decode_max<'a>(
&self,
buf: &'a [u8],
max: usize,
) -> Result<Plan<'a>, Error>
pub fn decode_max<'a>( &self, buf: &'a [u8], max: usize, ) -> Result<Plan<'a>, Error>
Bounds an emitted body fragment without copying or limiting framing progress.
pub fn decode<'a>(&self, buf: &'a [u8]) -> Result<Plan<'a>, Error>
pub fn body(buf: &[u8]) -> Result<Option<Vec<u8>>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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