pub struct Decoder<S, P, C = Buffer> { /* private fields */ }
Expand description
Used together with the decode!
macro
Implementations
sourceimpl<S, P> Decoder<S, P, Buffer> where
P: Default,
S: Default,
impl<S, P> Decoder<S, P, Buffer> where
P: Default,
S: Default,
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new Decoder
with an internal buffer. Allows any AsyncRead/Read
instance to
be used when decoding but there may be data left in the internal buffer after decoding
(accessible with Decoder::buffer
)
sourcepub fn new_buffer() -> Self
pub fn new_buffer() -> Self
Constructs a new Decoder
with an internal buffer. Allows any AsyncRead/Read
instance to
be used when decoding but there may be data left in the internal buffer after decoding
(accessible with Decoder::buffer
)
sourceimpl<S, P> Decoder<S, P, Bufferless> where
P: Default,
S: Default,
impl<S, P> Decoder<S, P, Bufferless> where
P: Default,
S: Default,
sourcepub fn new_bufferless() -> Self
pub fn new_bufferless() -> Self
Constructs a new Decoder
without an internal buffer. Requires the read instance to be
wrapped with combine’s BufReader
instance to
Trait Implementations
Auto Trait Implementations
impl<S, P, C> RefUnwindSafe for Decoder<S, P, C> where
C: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, P, C> Send for Decoder<S, P, C> where
C: Send,
P: Send,
S: Send,
impl<S, P, C> Sync for Decoder<S, P, C> where
C: Sync,
P: Sync,
S: Sync,
impl<S, P, C> Unpin for Decoder<S, P, C> where
C: Unpin,
P: Unpin,
S: Unpin,
impl<S, P, C> UnwindSafe for Decoder<S, P, C> where
C: UnwindSafe,
P: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more