pub trait Framing {
    type EncBuf: BufMutExt + Send + 'static;
    type DecBuf: BufExt + Send + 'static;

    // Required method
    fn enc_with_capacity(cap: usize) -> Self::EncBuf;
}
Expand description

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

Required Associated Types§

source

type EncBuf: BufMutExt + Send + 'static

Buffer type we encode into

source

type DecBuf: BufExt + Send + 'static

Buffer type we decode from

Required Methods§

source

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

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

Object Safety§

This trait is not object safe.

Implementors§