Trait WriteCtx

Source
pub trait WriteCtx<Ctx> {
    // Required method
    fn to_bytes(&self, ctx: Ctx) -> Vec<u8>;
}
Expand description

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

Required Methods§

Source

fn to_bytes(&self, ctx: Ctx) -> Vec<u8>

Implementations on Foreign Types§

Source§

impl<'a> WriteCtx<&Endian> for i8

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for i16

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for i32

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for i64

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for i128

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for u8

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for u16

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for u32

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for u64

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<'a> WriteCtx<&Endian> for u128

Source§

fn to_bytes(&self, ctx: &Endian) -> Vec<u8>

Source§

impl<T, Ctx> WriteCtx<Ctx> for Vec<T>
where T: WriteCtx<Ctx>, Ctx: Clone,

Source§

fn to_bytes(&self, ctx: Ctx) -> Vec<u8>

Implementors§