Trait Decode

Source
pub trait Decode: Sized {
    type Error: From<Error> + Error + Send + Sync + 'static;

    // Required method
    fn decode<R>(
        reader: &mut R,
    ) -> impl Future<Output = Result<Self, Self::Error>> + MaybeSend
       where R: SeqRead;
}

Required Associated Types§

Source

type Error: From<Error> + Error + Send + Sync + 'static

Required Methods§

Source

fn decode<R>( reader: &mut R, ) -> impl Future<Output = Result<Self, Self::Error>> + MaybeSend
where R: SeqRead,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Decode for bool

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for i8

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for i16

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for i32

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for i64

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for u8

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for u16

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for u32

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for u64

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for String

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl Decode for Bytes

Source§

type Error = Error

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Source§

impl<T> Decode for Arc<T>
where T: Decode,

Source§

type Error = <T as Decode>::Error

Source§

async fn decode<R>(reader: &mut R) -> Result<Self, Self::Error>
where R: SeqRead,

Source§

impl<T> Decode for Vec<T>
where T: Decode + Send + Sync, Error: From<<T as Decode>::Error>,

Source§

type Error = Error

Source§

async fn decode<R>(reader: &mut R) -> Result<Self, Self::Error>
where R: SeqRead,

Source§

impl<V> Decode for Option<V>
where V: Decode,

Source§

type Error = DecodeError<<V as Decode>::Error>

Source§

async fn decode<R: SeqRead>(reader: &mut R) -> Result<Self, Self::Error>

Implementors§