Trait crypto_bigint::Encoding [−][src]
pub trait Encoding: Sized { type Repr: Copy + Clone + AsRef<[u8]> + AsMut<[u8]> + Sized; const BIT_SIZE: usize; const BYTE_SIZE: usize; fn from_be_bytes(bytes: Self::Repr) -> Self; fn from_le_bytes(bytes: Self::Repr) -> Self; fn to_be_bytes(&self) -> Self::Repr; fn to_le_bytes(&self) -> Self::Repr; }
Expand description
Encoding support.
Associated Types
Associated Constants
Required methods
fn from_be_bytes(bytes: Self::Repr) -> Self
fn from_be_bytes(bytes: Self::Repr) -> Self
Decode from big endian bytes.
fn from_le_bytes(bytes: Self::Repr) -> Self
fn from_le_bytes(bytes: Self::Repr) -> Self
Decode from little endian bytes.
fn to_be_bytes(&self) -> Self::Repr
fn to_be_bytes(&self) -> Self::Repr
Encode to big endian bytes.
fn to_le_bytes(&self) -> Self::Repr
fn to_le_bytes(&self) -> Self::Repr
Encode to little endian bytes.