[][src]Enum async_codec::EncodeResult

pub enum EncodeResult<E> {
    Ok(usize),
    Err(E),
    Overflow(usize),
}

The result of an Encode::encode call

Variants

Ok(usize)

Item was successfully encoded and took usize bytes of the provided buffer.

Err(E)

There was an error encoding the item.

Overflow(usize)

The encoded item would overflow the buffer.

May contain the needed buffer size to successfully hold the encoded item. The value 0 indicates that the needed buffer size is unknown.

Trait Implementations

impl<E> From<Result<usize, E>> for EncodeResult<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for EncodeResult<E> where
    E: RefUnwindSafe

impl<E> Send for EncodeResult<E> where
    E: Send

impl<E> Sync for EncodeResult<E> where
    E: Sync

impl<E> Unpin for EncodeResult<E> where
    E: Unpin

impl<E> UnwindSafe for EncodeResult<E> where
    E: 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.