pub trait Encoder {
type Item;
type Error: From<Error>;
// Required method
fn encode(
&mut self,
item: Self::Item,
dst: &mut EncodeBuf<'_>,
) -> Result<(), Self::Error>;
// Provided method
fn buffer_settings(&self) -> BufferSettings { ... }
}
Expand description
Encodes gRPC message types
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn buffer_settings(&self) -> BufferSettings
fn buffer_settings(&self) -> BufferSettings
Controls how tonic creates and expands encode buffers.