Trait Codec
pub trait Codec:
Send
+ Sync
+ 'static {
type Encode: Send + Sync + 'static;
type Decode: Send + Sync + 'static;
type Encoder: Encoder<Item = Self::Encode, Error = Status> + Send + Sync + 'static;
type Decoder: Decoder<Item = Self::Decode, Error = Status> + Send + Sync + 'static;
// Required methods
fn encoder(&mut self) -> Self::Encoder;
fn decoder(&mut self) -> Self::Decoder;
}Available on crate features
grpc and http only.Expand description
Trait that knows how to encode and decode gRPC messages.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".