Trait BitRegister

Source
pub trait BitRegister: Unsigned + BitOps {
    const ALL: Self;
    const INDX: u8 = _;
    const MASK: u8 = _;
}
Expand description

§Register Descriptions

This trait describes the unsigned integer types that can be manipulated in a target processor’s general-purpose registers. It has no bearing on the processor instructions or registers used to interact with the memory bus, and solely exists to describe integers that can exist on a system.

Required Associated Constants§

Source

const ALL: Self

The literal !0.

Provided Associated Constants§

Source

const INDX: u8 = _

The number of bits required to store an index in the range 0 .. BITS.

Source

const MASK: u8 = _

A mask over all bits that can be used as an index within the element. This is the value with the least significant INDX-many bits set high.

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

Source§

const ALL: Self = 255u8

Source§

impl BitRegister for u16

Source§

const ALL: Self = 65_535u16

Source§

impl BitRegister for u32

Source§

const ALL: Self = 4_294_967_295u32

Source§

impl BitRegister for u64

u64 can only be used as a register on processors whose word size is at least 64 bits.

This implementation is not present on targets with 32-bit processor words.

Source§

const ALL: Self = 18_446_744_073_709_551_615u64

Source§

impl BitRegister for usize

Source§

const ALL: Self = 18_446_744_073_709_551_615usize

Implementors§