Skip to main content

Word

Trait Word 

Source
pub trait Word: PrimitiveUnsigned {
    const ZERO: Self;
    const ONE: Self;
}
Expand description

A convenience trait bundling the bounds required for word types used as backends for estimators, plus constants for zero and one (which avoid a dependence from the num-traits crate).

Required Associated Constants§

Source

const ZERO: Self

Source

const ONE: 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 Word for u8

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Word for u16

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Word for u32

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Word for u64

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Word for u128

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Word for usize

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Implementors§