IntoFrame

Trait IntoFrame 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

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 bool

Source§

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

Source§

impl IntoFrame for i8

Source§

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

Source§

impl IntoFrame for i16

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 i64

Source§

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

Source§

impl IntoFrame for u8

Source§

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

Source§

impl IntoFrame for u16

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 u64

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<T1, T2> IntoFrame for (T1, T2)
where T1: IntoFrame, T2: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3> IntoFrame for (T1, T2, T3)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3, T4> IntoFrame for (T1, T2, T3, T4)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame, T4: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3, T4, T5> IntoFrame for (T1, T2, T3, T4, T5)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame, T4: IntoFrame, T5: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3, T4, T5, T6> IntoFrame for (T1, T2, T3, T4, T5, T6)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame, T4: IntoFrame, T5: IntoFrame, T6: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3, T4, T5, T6, T7> IntoFrame for (T1, T2, T3, T4, T5, T6, T7)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame, T4: IntoFrame, T5: IntoFrame, T6: IntoFrame, T7: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8> IntoFrame for (T1, T2, T3, T4, T5, T6, T7, T8)
where T1: IntoFrame, T2: IntoFrame, T3: IntoFrame, T4: IntoFrame, T5: IntoFrame, T6: IntoFrame, T7: IntoFrame, T8: IntoFrame,

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

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

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

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

Source§

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

Source§

fn size_hint(&self) -> usize

Source§

impl<T: IntoFrame> IntoFrame for Vec<T>

Source§

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

Source§

fn size_hint(&self) -> usize

Implementors§