pub trait ToBytes {
    // Required method
    fn to_bytes(&self, buf: &mut impl WritableBuffer);
}
Expand description

Allows a type to be converted to bytes and appended to a WriteableBuffer

Required Methods§

source

fn to_bytes(&self, buf: &mut impl WritableBuffer)

Converts a type into bytes and appends it to the buffer.

Implementations on Foreign Types§

source§

impl ToBytes for i16

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for bool

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for i32

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for f64

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for &str

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for f32

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for u16

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for String

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for u8

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for u32

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

source§

impl ToBytes for i8

source§

fn to_bytes(&self, buf: &mut impl WritableBuffer)

Implementors§