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; }
Trait that knows how to encode and decode gRPC messages.
Associated Types
type Encode: Send + 'static
[src]
The encodable message.
type Decode: Send + 'static
[src]
The decodable message.
type Encoder: Encoder<Item = Self::Encode, Error = Status> + Send + Sync + 'static
[src]
The encoder that can encode a message.
type Decoder: Decoder<Item = Self::Decode, Error = Status> + Send + Sync + 'static
[src]
The encoder that can decode a message.
Required methods
fn encoder(&mut self) -> Self::Encoder
[src]
Fetch the encoder.
fn decoder(&mut self) -> Self::Decoder
[src]
Fetch the decoder.
Implementors
Loading content...