Trait Bits

Source
pub trait Bits: Sized + Copy {
    // Required methods
    fn bit(self, bit: u32) -> bool;
    fn bits(self, range: Range<u32>) -> usize;

    // Provided methods
    fn b(self, bit: u32) -> bool { ... }
    fn u8(self, range: Range<u32>) -> u8 { ... }
    fn i8(self, range: Range<u32>) -> i8 { ... }
    fn u16(self, range: Range<u32>) -> u16 { ... }
    fn word(self, range: Range<u32>) -> Word { ... }
    fn select(self, range: Range<u32>) -> Word { ... }
    fn i16(self, range: Range<u32>) -> i16 { ... }
    fn u32(self, range: Range<u32>) -> u32 { ... }
    fn i32(self, range: Range<u32>) -> i32 { ... }
    fn reg(self, lowest_bit: u32) -> Reg { ... }
}

Required Methods§

Source

fn bit(self, bit: u32) -> bool

Source

fn bits(self, range: Range<u32>) -> usize

Provided Methods§

Source

fn b(self, bit: u32) -> bool

Source

fn u8(self, range: Range<u32>) -> u8

Source

fn i8(self, range: Range<u32>) -> i8

Source

fn u16(self, range: Range<u32>) -> u16

Source

fn word(self, range: Range<u32>) -> Word

Source

fn select(self, range: Range<u32>) -> Word

Source

fn i16(self, range: Range<u32>) -> i16

Source

fn u32(self, range: Range<u32>) -> u32

Source

fn i32(self, range: Range<u32>) -> i32

Source

fn reg(self, lowest_bit: u32) -> Reg

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 Bits for u32

Source§

fn bit(self, bit: u32) -> bool

Source§

fn bits(self, range: Range<u32>) -> usize

Implementors§