Trait bin_utils::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 u16

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<'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 u8

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, T, Ctx> WriteCtx<Ctx> for Vec<T>where T: WriteCtx<Ctx>, Ctx: Clone,

source§

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

Implementors§