Trait tonic::codec::Encoder[][src]

pub trait Encoder {
    type Item;
    type Error: From<Error>;
    fn encode(
        &mut self,
        item: Self::Item,
        dst: &mut EncodeBuf<'_>
    ) -> Result<(), Self::Error>; }

Encodes gRPC message types

Associated Types

type Item[src]

The type that is encoded.

type Error: From<Error>[src]

The type of encoding errors.

The type of unrecoverable frame encoding errors.

Loading content...

Required methods

fn encode(
    &mut self,
    item: Self::Item,
    dst: &mut EncodeBuf<'_>
) -> Result<(), Self::Error>
[src]

Encodes a message into the provided buffer.

Loading content...

Implementors

Loading content...