[][src]Trait tower_grpc::generic::Encoder

pub trait Encoder {
    type Item;

    const CONTENT_TYPE: &'static str;

    fn encode(
        &mut self,
        item: Self::Item,
        buf: &mut EncodeBuf
    ) -> Result<(), Status>; }

Encodes gRPC message types

Associated Types

type Item

Type that is encoded

Loading content...

Associated Constants

const CONTENT_TYPE: &'static str

The content-type header for messages using this encoding.

Should be application/grpc+yourencoding.

Loading content...

Required methods

fn encode(
    &mut self,
    item: Self::Item,
    buf: &mut EncodeBuf
) -> Result<(), Status>

Encode a message into the provided buffer.

Loading content...

Implementors

Loading content...