Trait UIntLike

Source
pub trait UIntLike: TRUIntLike {
    // Required methods
    fn one() -> Self;
    fn trailing_zeros(self) -> u32;
    fn into_usize(self) -> usize;

    // Provided method
    fn max() -> Self { ... }
}
Expand description

Extension of the tock_registers UIntLike trait.

This extends the UIntLike trait of tock_registers to also provide the 1 and maximum (all bits set) values of the respective integer type

This allows for peripherals to be written generic over the underlying CSR width (as in the case of event managers, LEDs, etc.), manipulating bitmaps

Required Methods§

Source

fn one() -> Self

Source

fn trailing_zeros(self) -> u32

Source

fn into_usize(self) -> usize

Provided Methods§

Source

fn max() -> 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 UIntLike for u8

Source§

impl UIntLike for u16

Source§

impl UIntLike for u32

Source§

impl UIntLike for u64

Source§

impl UIntLike for u128

Implementors§