hacspec_lib::prelude

Trait UnsignedPublicInteger

Source
pub trait UnsignedPublicInteger: UnsignedInteger + PublicInteger {
    // Required methods
    fn to_le_bytes(self) -> Seq<u8>;
    fn to_be_bytes(self) -> Seq<u8>;
    fn from_le_bytes(x: &Seq<u8>) -> Self;
    fn from_be_bytes(x: &Seq<u8>) -> Self;
}

Required Methods§

Source

fn to_le_bytes(self) -> Seq<u8>

Source

fn to_be_bytes(self) -> Seq<u8>

Source

fn from_le_bytes(x: &Seq<u8>) -> Self

Source

fn from_be_bytes(x: &Seq<u8>) -> Self

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 UnsignedPublicInteger for u8

Source§

fn to_le_bytes(self) -> Seq<u8>

Source§

fn to_be_bytes(self) -> Seq<u8>

Source§

fn from_le_bytes(x: &Seq<u8>) -> Self

Source§

fn from_be_bytes(x: &Seq<u8>) -> Self

Source§

impl UnsignedPublicInteger for u16

Source§

fn to_le_bytes(self) -> Seq<u8>

Source§

fn to_be_bytes(self) -> Seq<u8>

Source§

fn from_le_bytes(x: &Seq<u8>) -> Self

Source§

fn from_be_bytes(x: &Seq<u8>) -> Self

Source§

impl UnsignedPublicInteger for u32

Source§

fn to_le_bytes(self) -> Seq<u8>

Source§

fn to_be_bytes(self) -> Seq<u8>

Source§

fn from_le_bytes(x: &Seq<u8>) -> Self

Source§

fn from_be_bytes(x: &Seq<u8>) -> Self

Source§

impl UnsignedPublicInteger for u64

Source§

fn to_le_bytes(self) -> Seq<u8>

Source§

fn to_be_bytes(self) -> Seq<u8>

Source§

fn from_le_bytes(x: &Seq<u8>) -> Self

Source§

fn from_be_bytes(x: &Seq<u8>) -> Self

Source§

impl UnsignedPublicInteger for u128

Source§

fn to_le_bytes(self) -> Seq<u8>

Source§

fn to_be_bytes(self) -> Seq<u8>

Source§

fn from_le_bytes(x: &Seq<u8>) -> Self

Source§

fn from_be_bytes(x: &Seq<u8>) -> Self

Implementors§