[][src]Trait fbthrift_git::framing::Framing

pub trait Framing {
    type EncBuf: BufMutExt + Send + 'static;
    type DecBuf: BufExt + Send + 'static;
    type Meta;
    fn enc_with_capacity(cap: usize) -> Self::EncBuf;
fn get_meta(&self) -> Self::Meta; }

Trait describing the in-memory frames the transport uses for Protocol messages.

Associated Types

type EncBuf: BufMutExt + Send + 'static

Buffer type we encode into

type DecBuf: BufExt + Send + 'static

Buffer type we decode from

type Meta

Arbitrary metadata associated with a frame. This is passed to server methods, but they need to specify some particular concrete type (ie, be implemented for a specific kind of framing) in order to make use of it.

Loading content...

Required methods

fn enc_with_capacity(cap: usize) -> Self::EncBuf

Allocate a new encoding buffer with a given capacity FIXME: need &self?

fn get_meta(&self) -> Self::Meta

Get the metadata associated with this frame.

Loading content...

Implementations on Foreign Types

impl Framing for Bytes[src]

type EncBuf = BytesMut

type DecBuf = Cursor<Bytes>

type Meta = ()

Loading content...

Implementors

Loading content...