[][src]Trait tonic::codec::Decoder

pub trait Decoder {
    type Item;
    type Error: From<Error>;
    fn decode(
        &mut self,
        src: &mut DecodeBuf
    ) -> Result<Option<Self::Item>, Self::Error>; }

Decodes gRPC message types

Associated Types

type Item

The type that is decoded.

type Error: From<Error>

The type of unrecoverable frame decoding errors.

Loading content...

Required methods

fn decode(
    &mut self,
    src: &mut DecodeBuf
) -> Result<Option<Self::Item>, Self::Error>

Decode a message from the buffer.

The buffer will contain exactly the bytes of a full message. There is no need to get the length from the bytes, gRPC framing is handled for you.

Loading content...

Implementors

Loading content...