Trait Serialize

Source
pub trait Serialize: Copy + Sized {
    type MaxEncLen: ArrayLength;

    // Required method
    fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8] ;
}

Required Associated Types§

Required Methods§

Source

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

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 Serialize for u8

Source§

type MaxEncLen = UInt<UInt<UTerm, B1>, B0>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Source§

impl Serialize for u16

Source§

type MaxEncLen = UInt<UInt<UTerm, B1>, B1>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Source§

impl Serialize for u32

Source§

type MaxEncLen = UInt<UInt<UInt<UTerm, B1>, B0>, B1>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Source§

impl Serialize for u64

Source§

type MaxEncLen = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Source§

impl Serialize for u128

Source§

type MaxEncLen = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>, B1>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Source§

impl Serialize for usize

Source§

type MaxEncLen = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>

Source§

fn encode(self, buf: &mut GenericArray<u8, Self::MaxEncLen>) -> &[u8]

Implementors§