pub trait IntoFrame: Sized {
    // Required method
    fn extend_frame(&self, frame: &mut BytesMut);

    // Provided methods
    fn size_hint(&self) -> usize { ... }
    fn into_frame(&self) -> Bytes { ... }
}
Expand description

Trait for converting a Self into a frame.

Required Methods§

source

fn extend_frame(&self, frame: &mut BytesMut)

Extend a frame with the contents of Self.

Provided Methods§

source

fn size_hint(&self) -> usize

Returns the size hint of Self in bytes.

source

fn into_frame(&self) -> Bytes

Converts Self into an owned frame.

Implementations on Foreign Types§

source§

impl IntoFrame for &str

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

fn size_hint(&self) -> usize

source§

impl IntoFrame for u8

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl<T> IntoFrame for Vec<T, Global>where T: IntoFrame,

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

fn size_hint(&self) -> usize

source§

impl IntoFrame for bool

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for u64

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for i32

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for i16

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl<T> IntoFrame for Option<T>where T: IntoFrame,

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

fn size_hint(&self) -> usize

source§

impl IntoFrame for i8

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for u32

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for String

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

fn size_hint(&self) -> usize

source§

impl<T> IntoFrame for HashSet<T, RandomState>where T: IntoFrame + PartialEq<T> + Eq + Hash,

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

fn size_hint(&self) -> usize

source§

impl IntoFrame for i64

source§

fn extend_frame(&self, frame: &mut BytesMut)

source§

impl IntoFrame for u16

source§

fn extend_frame(&self, frame: &mut BytesMut)

Implementors§