Trait Writeable

Source
pub trait Writeable: Sized {
    // Required methods
    fn to_u8_be(_: &Self, _: &mut [u8]);
    fn to_u8_le(_: &Self, _: &mut [u8]);
}
Expand description

Any type implementing Writeable can be encoded from binary.

Required Methods§

Source

fn to_u8_be(_: &Self, _: &mut [u8])

Source

fn to_u8_le(_: &Self, _: &mut [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 Writeable for bool

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for f32

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for f64

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for i8

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for i16

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for i32

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for i64

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for u8

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for u16

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for u32

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl Writeable for u64

Source§

fn to_u8_be(v: &Self, a: &mut [u8])

Source§

fn to_u8_le(v: &Self, a: &mut [u8])

Source§

impl<T: Writeable> Writeable for Vec<T>

Source§

fn to_u8_be(v: &Self, buf: &mut [u8])

Source§

fn to_u8_le(v: &Self, buf: &mut [u8])

Implementors§