Trait packed_struct::types::IntegerAsBytes[][src]

pub trait IntegerAsBytes where
    Self: Sized
{ type AsBytes; fn to_msb_bytes(&self) -> Self::AsBytes;
fn to_lsb_bytes(&self) -> Self::AsBytes;
fn from_msb_bytes(bytes: &Self::AsBytes) -> Self;
fn from_lsb_bytes(bytes: &Self::AsBytes) -> Self; }
Expand description

Convert a native platform integer type into a byte array.

Associated Types

The byte array type, for instance [u8; 2].

Required methods

Convert into a MSB byte array.

Convert into a LSB byte array.

Convert from a MSB byte array.

Convert from a LSB byte array.

Implementations on Foreign Types

Implementors