[−][src]Struct ruspiro_register::RegisterFieldValue
Definition of a specific fieldvalue of a regiser. This structure allows to combine field values with bit operators
like |
and &
to build the final value that should be written to a register
Implementations
impl RegisterFieldValue<u8>
[src]
pub fn new(field: RegisterField<u8>, value: u8) -> Self
[src]
Create a new fieldvalue based on the field definition and the value given
pub fn value(&self) -> u8
[src]
Retrieve the register field value
pub fn raw_value(&self) -> u8
[src]
Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted
pub fn mask(&self) -> u8
[src]
Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position
impl RegisterFieldValue<u16>
[src]
pub fn new(field: RegisterField<u16>, value: u16) -> Self
[src]
Create a new fieldvalue based on the field definition and the value given
pub fn value(&self) -> u16
[src]
Retrieve the register field value
pub fn raw_value(&self) -> u16
[src]
Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted
pub fn mask(&self) -> u16
[src]
Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position
impl RegisterFieldValue<u32>
[src]
pub fn new(field: RegisterField<u32>, value: u32) -> Self
[src]
Create a new fieldvalue based on the field definition and the value given
pub fn value(&self) -> u32
[src]
Retrieve the register field value
pub fn raw_value(&self) -> u32
[src]
Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted
pub fn mask(&self) -> u32
[src]
Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position
impl RegisterFieldValue<u64>
[src]
pub fn new(field: RegisterField<u64>, value: u64) -> Self
[src]
Create a new fieldvalue based on the field definition and the value given
pub fn value(&self) -> u64
[src]
Retrieve the register field value
pub fn raw_value(&self) -> u64
[src]
Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted
pub fn mask(&self) -> u64
[src]
Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position
Trait Implementations
impl BitAnd<RegisterFieldValue<u16>> for RegisterFieldValue<u16>
[src]
type Output = RegisterFieldValue<u16>
The resulting type after applying the &
operator.
fn bitand(self, rhs: RegisterFieldValue<u16>) -> Self
[src]
impl BitAnd<RegisterFieldValue<u32>> for RegisterFieldValue<u32>
[src]
type Output = RegisterFieldValue<u32>
The resulting type after applying the &
operator.
fn bitand(self, rhs: RegisterFieldValue<u32>) -> Self
[src]
impl BitAnd<RegisterFieldValue<u64>> for RegisterFieldValue<u64>
[src]
type Output = RegisterFieldValue<u64>
The resulting type after applying the &
operator.
fn bitand(self, rhs: RegisterFieldValue<u64>) -> Self
[src]
impl BitAnd<RegisterFieldValue<u8>> for RegisterFieldValue<u8>
[src]
type Output = RegisterFieldValue<u8>
The resulting type after applying the &
operator.
fn bitand(self, rhs: RegisterFieldValue<u8>) -> Self
[src]
impl BitOr<RegisterFieldValue<u16>> for RegisterFieldValue<u16>
[src]
type Output = RegisterFieldValue<u16>
The resulting type after applying the |
operator.
fn bitor(self, rhs: RegisterFieldValue<u16>) -> Self
[src]
impl BitOr<RegisterFieldValue<u32>> for RegisterFieldValue<u32>
[src]
type Output = RegisterFieldValue<u32>
The resulting type after applying the |
operator.
fn bitor(self, rhs: RegisterFieldValue<u32>) -> Self
[src]
impl BitOr<RegisterFieldValue<u64>> for RegisterFieldValue<u64>
[src]
type Output = RegisterFieldValue<u64>
The resulting type after applying the |
operator.
fn bitor(self, rhs: RegisterFieldValue<u64>) -> Self
[src]
impl BitOr<RegisterFieldValue<u8>> for RegisterFieldValue<u8>
[src]
type Output = RegisterFieldValue<u8>
The resulting type after applying the |
operator.
fn bitor(self, rhs: RegisterFieldValue<u8>) -> Self
[src]
impl<T: Clone + RegisterType> Clone for RegisterFieldValue<T>
[src]
fn clone(&self) -> RegisterFieldValue<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy + RegisterType> Copy for RegisterFieldValue<T>
[src]
impl<T: Debug + RegisterType> Debug for RegisterFieldValue<T>
[src]
Auto Trait Implementations
impl<T> Send for RegisterFieldValue<T> where
T: Send,
T: Send,
impl<T> Sync for RegisterFieldValue<T> where
T: Sync,
T: Sync,
impl<T> Unpin for RegisterFieldValue<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,