pub trait Unsigned: Unsigned + WrappingAdd + WrappingSub + WrappingShl + WrappingShr + BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Shl<Output = Self> + Shr<Output = Self> + From<u8> + Copy {
    type Array;

    const BITS: Self;
    const BITSU32: u32;
    const BYTES: usize;
    const P: Self;
    const Q: Self;

    // Required methods
    fn from_le_bytes(bytes: Self::Array) -> Self;
    fn to_le_bytes(a: Self) -> Vec<u8>;
}

Required Associated Types§

Required Associated Constants§

source

const BITS: Self

source

const BITSU32: u32

source

const BYTES: usize

source

const P: Self

source

const Q: Self

Required Methods§

source

fn from_le_bytes(bytes: Self::Array) -> Self

source

fn to_le_bytes(a: Self) -> Vec<u8>

Implementations on Foreign Types§

source§

impl Unsigned for u8

§

type Array = [u8; 1]

source§

const BITS: Self = 8u8

source§

const BITSU32: u32 = 8u32

source§

const BYTES: usize = 1usize

source§

const P: Self = 183u8

source§

const Q: Self = 159u8

source§

fn from_le_bytes(bytes: Self::Array) -> u8

source§

fn to_le_bytes(a: Self) -> Vec<u8>

source§

impl Unsigned for u16

§

type Array = [u8; 2]

source§

const BITS: Self = 16u16

source§

const BITSU32: u32 = 16u32

source§

const BYTES: usize = 2usize

source§

const P: Self = 47_073u16

source§

const Q: Self = 40_503u16

source§

fn from_le_bytes(bytes: Self::Array) -> u16

source§

fn to_le_bytes(a: Self) -> Vec<u8>

source§

impl Unsigned for u64

§

type Array = [u8; 8]

source§

const BITS: Self = 64u64

source§

const BITSU32: u32 = 64u32

source§

const BYTES: usize = 8usize

source§

const P: Self = 13_249_961_062_380_153_451u64

source§

const Q: Self = 11_400_714_819_323_198_485u64

source§

fn from_le_bytes(bytes: Self::Array) -> u64

source§

fn to_le_bytes(a: Self) -> Vec<u8>

source§

impl Unsigned for u32

§

type Array = [u8; 4]

source§

const BITS: Self = 32u32

source§

const BITSU32: u32 = 32u32

source§

const BYTES: usize = 4usize

source§

const P: Self = 3_084_996_963u32

source§

const Q: Self = 2_654_435_769u32

source§

fn from_le_bytes(bytes: Self::Array) -> u32

source§

fn to_le_bytes(a: Self) -> Vec<u8>

source§

impl Unsigned for u128

§

type Array = [u8; 16]

source§

const BITS: Self = 128u128

source§

const BITSU32: u32 = 128u32

source§

const BYTES: usize = 16usize

source§

const P: Self = 244_418_640_704_343_410_224_161_820_979_800_372_167u128

source§

const Q: Self = 210_306_068_529_402_873_165_736_369_884_012_333_109u128

source§

fn from_le_bytes(bytes: Self::Array) -> u128

source§

fn to_le_bytes(a: Self) -> Vec<u8>

Implementors§