pub trait WriteFixedCtx<const N: usize, Ctx>where
    Self: Sized,{
    // Required method
    fn to_bytes(&self, ctx: Ctx) -> [u8; N];
}
Expand description

A trait for writing data of fixed length, with context.

Required Methods§

source

fn to_bytes(&self, ctx: Ctx) -> [u8; N]

Implementations on Foreign Types§

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for u128

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 16]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for i16

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 2]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for i64

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 8]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for u8

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 1]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for u16

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 2]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for i128

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 16]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for u32

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 4]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for i32

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 4]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for u64

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 8]

source§

impl WriteFixedCtx<{ ::core::mem::size_of::<$number_type>() }, Endian> for i8

source§

fn to_bytes(&self, ctx: Endian) -> [u8; 1]

Implementors§