[][src]Struct ruspiro_register::RegisterField

pub struct RegisterField<T: RegisterType> { /* fields omitted */ }

Definition of a field contained inside of a register. Each field is defined by a mask and the bit shift value when constructing the field definition the stored mask is already shifted by the shift value

Implementations

impl RegisterField<u8>[src]

pub fn new(mask: u8, shift: u8) -> RegisterField<u8>[src]

Create a new register field definition with the mask and the shift offset for this mask. The offset is the bit offset this field begins.

pub fn mask(&self) -> u8[src]

retrieve the current mask of the field shifted to its correct position

pub fn shift(&self) -> u8[src]

retrieve the current shift of the field

impl RegisterField<u16>[src]

pub fn new(mask: u16, shift: u16) -> RegisterField<u16>[src]

Create a new register field definition with the mask and the shift offset for this mask. The offset is the bit offset this field begins.

pub fn mask(&self) -> u16[src]

retrieve the current mask of the field shifted to its correct position

pub fn shift(&self) -> u16[src]

retrieve the current shift of the field

impl RegisterField<u32>[src]

pub fn new(mask: u32, shift: u32) -> RegisterField<u32>[src]

Create a new register field definition with the mask and the shift offset for this mask. The offset is the bit offset this field begins.

pub fn mask(&self) -> u32[src]

retrieve the current mask of the field shifted to its correct position

pub fn shift(&self) -> u32[src]

retrieve the current shift of the field

impl RegisterField<u64>[src]

pub fn new(mask: u64, shift: u64) -> RegisterField<u64>[src]

Create a new register field definition with the mask and the shift offset for this mask. The offset is the bit offset this field begins.

pub fn mask(&self) -> u64[src]

retrieve the current mask of the field shifted to its correct position

pub fn shift(&self) -> u64[src]

retrieve the current shift of the field

Trait Implementations

impl<T: Clone + RegisterType> Clone for RegisterField<T>[src]

impl<T: Copy + RegisterType> Copy for RegisterField<T>[src]

impl<T: Debug + RegisterType> Debug for RegisterField<T>[src]

Auto Trait Implementations

impl<T> Send for RegisterField<T> where
    T: Send

impl<T> Sync for RegisterField<T> where
    T: Sync

impl<T> Unpin for RegisterField<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.