pub struct StreamDecoder(/* private fields */);Expand description
Decoder for one direction of one logical session.
Implementations§
Source§impl StreamDecoder
impl StreamDecoder
pub fn new(encoding: StreamEncoding) -> Result<Self, StreamEncodingError>
Sourcepub fn decode(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<DecodeProgress, StreamEncodingError>
pub fn decode( &mut self, input: &[u8], output: &mut [u8], ) -> Result<DecodeProgress, StreamEncodingError>
Decode a prefix of input into at most output.len() bytes.
Bytes not consumed stay with the caller. Zero progress means the decoder needs more input or more output space. After the end mark the decoder consumes nothing, so the input following it remains raw.
Auto Trait Implementations§
impl Freeze for StreamDecoder
impl RefUnwindSafe for StreamDecoder
impl Send for StreamDecoder
impl Sync for StreamDecoder
impl Unpin for StreamDecoder
impl UnsafeUnpin for StreamDecoder
impl UnwindSafe for StreamDecoder
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