[−][src]Struct ruspiro_register::register::RegisterField
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
Methods
impl RegisterField<u8>
[src]
pub const 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 const 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 const 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 const 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: Debug + RegisterType> Debug for RegisterField<T>
[src]
impl<T: Copy + RegisterType> Copy for RegisterField<T>
[src]
impl<T: Clone + RegisterType> Clone for RegisterField<T>
[src]
fn clone(&self) -> RegisterField<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<T> Unpin for RegisterField<T> where
T: Unpin,
T: Unpin,
impl<T> Send for RegisterField<T> where
T: Send,
T: Send,
impl<T> Sync for RegisterField<T> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,