[][src]Struct combine::stream::decoder::Decoder

pub struct Decoder<S, P, C = Buffer> { /* fields omitted */ }

Used together with the decode! macro

Implementations

impl<S, P> Decoder<S, P, Buffer> where
    P: Default,
    S: Default
[src]

pub fn new() -> Self[src]

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

pub fn new_buffer() -> Self[src]

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

impl<S, P> Decoder<S, P, Bufferless> where
    P: Default,
    S: Default
[src]

pub fn new_bufferless() -> Self[src]

Constructs a new Decoder without an internal buffer. Requires the read instance to be wrapped with combine's BufReader instance to

impl<S, P> Decoder<S, P>[src]

pub fn buffer(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

impl<S, P, C> Decoder<S, P, C>[src]

pub fn position(&self) -> &P

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

Trait Implementations

impl<S: Default, P: Default, C: Default> Default for Decoder<S, P, C>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.