Trait tonic::codec::Decoder

source ·
pub trait Decoder {
    type Item;
    type Error: From<Error>;

    fn decode(
        &mut self,
        src: &mut DecodeBuf<'_>
    ) -> Result<Option<Self::Item>, Self::Error>; }
Expand description

Decodes gRPC message types

Required Associated Types§

The type that is decoded.

The type of unrecoverable frame decoding errors.

Required Methods§

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.

Implementors§