Trait RawReg

Source
pub trait RawReg:
    Copy
    + From<bool>
    + BitOr<Output = Self>
    + BitAnd<Output = Self>
    + BitOrAssign
    + BitAndAssign
    + Not<Output = Self>
    + Shl<u8, Output = Self> {
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn mask<const WI: u8>() -> Self;
}
Expand description

Raw register type (u8, u16, u32, …)

Required Associated Constants§

Source

const ZERO: Self

0

Source

const ONE: Self

1

Required Methods§

Source

fn mask<const WI: u8>() -> Self

Mask for bits of width WI

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

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 1u8

Source§

fn mask<const WI: u8>() -> Self

Source§

impl RawReg for u16

Source§

const ZERO: Self = 0u16

Source§

const ONE: Self = 1u16

Source§

fn mask<const WI: u8>() -> Self

Source§

impl RawReg for u32

Source§

const ZERO: Self = 0u32

Source§

const ONE: Self = 1u32

Source§

fn mask<const WI: u8>() -> Self

Source§

impl RawReg for u64

Source§

const ZERO: Self = 0u64

Source§

const ONE: Self = 1u64

Source§

fn mask<const WI: u8>() -> Self

Implementors§