Trait tonic::codec::Codec[][src]

pub trait Codec: Default {
    type Encode: Send + 'static;
    type Decode: Send + 'static;
    type Encoder: Encoder<Item = Self::Encode, Error = Status> + Send + Sync + 'static;
    type Decoder: Decoder<Item = Self::Decode, Error = Status> + Send + Sync + 'static;
    fn encoder(&mut self) -> Self::Encoder;
fn decoder(&mut self) -> Self::Decoder; }
Expand description

Trait that knows how to encode and decode gRPC messages.

Associated Types

The encodable message.

The decodable message.

The encoder that can encode a message.

The encoder that can decode a message.

Required methods

Fetch the encoder.

Fetch the decoder.

Implementors