wiwi::num

Trait Endian

Source
pub trait Endian<Num, const N: usize>
where Self: Sealed, Num: ArrayConversions<N>,
{ // Required methods fn from_bytes(bytes: [u8; N]) -> Num; fn into_bytes(num: Num) -> [u8; N]; }

Required Methods§

Source

fn from_bytes(bytes: [u8; N]) -> Num

Source

fn into_bytes(num: Num) -> [u8; N]

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.

Implementors§

Source§

impl<Num, const N: usize> Endian<Num, N> for EndianBig
where Num: ArrayConversions<N>,

Source§

impl<Num, const N: usize> Endian<Num, N> for EndianLittle
where Num: ArrayConversions<N>,

Source§

impl<Num, const N: usize> Endian<Num, N> for EndianNative
where Num: ArrayConversions<N>,