pub trait IntegerEncoding
where Self: Sized,
{ type Bytes: ByteArray; // Required methods fn to_be_bytes(&self) -> Self::Bytes; fn to_le_bytes(&self) -> Self::Bytes; fn from_be_bytes(bytes: &Self::Bytes) -> Self; fn from_le_bytes(bytes: &Self::Bytes) -> Self; fn from_be_bytes_exact(bytes: &Self::Bytes) -> Option<Self>; fn from_le_bytes_exact(bytes: &Self::Bytes) -> Option<Self>; }

Required Associated Types§

Required Methods§

source

fn to_be_bytes(&self) -> Self::Bytes

source

fn to_le_bytes(&self) -> Self::Bytes

source

fn from_be_bytes(bytes: &Self::Bytes) -> Self

source

fn from_le_bytes(bytes: &Self::Bytes) -> Self

source

fn from_be_bytes_exact(bytes: &Self::Bytes) -> Option<Self>

source

fn from_le_bytes_exact(bytes: &Self::Bytes) -> Option<Self>

Object Safety§

This trait is not object safe.

Implementors§