pub trait Codec {
type Encode: Send + 'static;
type Decode: Send + 'static;
type Encoder: Encoder<Item = Self::Encode, Error = Status> + Send + 'static;
type Decoder: Decoder<Item = Self::Decode, Error = Status> + Send + 'static;
// Required methods
fn encoder(&mut self) -> Self::Encoder;
fn decoder(&mut self) -> Self::Decoder;
}
Expand description
Trait that knows how to encode and decode gRPC messages.