Trait madsim_tonic::codec::Codec
source · [−]pub trait Codec {
type Encode: 'static + Send;
type Decode: 'static + Send;
type Encoder: 'static + Encoder + Send
where
<Self::Encoder as Encoder>::Item == Self::Encode,
<Self::Encoder as Encoder>::Error == Status;
type Decoder: 'static + Decoder + Send
where
<Self::Decoder as Decoder>::Item == Self::Decode,
<Self::Decoder as Decoder>::Error == Status;
fn encoder(&mut self) -> Self::Encoder;
fn decoder(&mut self) -> Self::Decoder;
}
Expand description
Trait that knows how to encode and decode gRPC messages.
Required Associated Types
The encoder that can encode a message.