[][src]Trait tower_grpc::generic::Decoder

pub trait Decoder {
    type Item;
    fn decode(&mut self, buf: &mut DecodeBuf) -> Result<Self::Item, Status>;
}

Decodes gRPC message types

Associated Types

type Item

Type that is decoded

Loading content...

Required methods

fn decode(&mut self, buf: &mut DecodeBuf) -> Result<Self::Item, Status>

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...