RawReg

Trait RawReg 

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§

const ZERO: Self

0

const ONE: Self

1

Required Methods§

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§

§

impl RawReg for u8

§

const ZERO: Self = 0u8

§

const ONE: Self = 1u8

§

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

§

impl RawReg for u16

§

const ZERO: Self = 0u16

§

const ONE: Self = 1u16

§

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

§

impl RawReg for u32

§

const ZERO: Self = 0u32

§

const ONE: Self = 1u32

§

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

§

impl RawReg for u64

§

const ZERO: Self = 0u64

§

const ONE: Self = 1u64

§

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

Implementors§