pub trait Encoder {
type Item;
const CONTENT_TYPE: &'static str;
// Required method
fn encode(
&mut self,
item: Self::Item,
buf: &mut EncodeBuf<'_>,
) -> Result<(), Status>;
}Expand description
Encodes gRPC message types
Required Associated Constants§
Sourceconst CONTENT_TYPE: &'static str
const CONTENT_TYPE: &'static str
The content-type header for messages using this encoding.
Should be application/grpc+yourencoding.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.