Trait Encodable

Source
pub trait Encodable {
    // Required method
    fn encode(&self, out: &mut dyn BufMut);

    // Provided method
    fn length(&self) -> usize { ... }
}

Required Methods§

Source

fn encode(&self, out: &mut dyn BufMut)

Provided Methods§

Source

fn length(&self) -> usize

Implementations on Foreign Types§

Source§

impl Encodable for bool

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for u8

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for u16

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for u32

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for u64

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for u128

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for usize

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for Bytes

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl Encodable for BytesMut

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl<'a> Encodable for &'a [u8]

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

impl<'a, T: 'a + Encodable + ?Sized> Encodable for &'a T

Source§

fn encode(&self, out: &mut dyn BufMut)

Source§

fn length(&self) -> usize

Source§

impl<const LEN: usize> Encodable for [u8; LEN]

Source§

fn length(&self) -> usize

Source§

fn encode(&self, out: &mut dyn BufMut)

Implementors§