Struct kernel::utilities::registers::FieldValue
source · pub struct FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,{
pub value: T,
/* private fields */
}
Expand description
Values for the specific register fields.
For the FieldValue, the masks and values are shifted into their actual location in the register.
Fields§
§value: T
Implementations§
source§impl<R> FieldValue<u8, R>where
R: RegisterLongName,
impl<R> FieldValue<u8, R>where
R: RegisterLongName,
source§impl<R> FieldValue<u16, R>where
R: RegisterLongName,
impl<R> FieldValue<u16, R>where
R: RegisterLongName,
source§impl<R> FieldValue<u32, R>where
R: RegisterLongName,
impl<R> FieldValue<u32, R>where
R: RegisterLongName,
source§impl<R> FieldValue<u64, R>where
R: RegisterLongName,
impl<R> FieldValue<u64, R>where
R: RegisterLongName,
source§impl<R> FieldValue<u128, R>where
R: RegisterLongName,
impl<R> FieldValue<u128, R>where
R: RegisterLongName,
source§impl<R> FieldValue<usize, R>where
R: RegisterLongName,
impl<R> FieldValue<usize, R>where
R: RegisterLongName,
source§impl<T, R> FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
impl<T, R> FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
pub fn none() -> FieldValue<T, R>
pub fn read(&self, field: Field<T, R>) -> T
sourcepub fn any_matching_bits_set(&self, val: T) -> bool
pub fn any_matching_bits_set(&self, val: T) -> bool
Check if any of the bits covered by the mask for this
FieldValue
and set in the FieldValue
are also set
in the passed value
sourcepub fn matches_all(&self, val: T) -> bool
pub fn matches_all(&self, val: T) -> bool
Check if all specified parts of a field match
Trait Implementations§
source§impl<T, R> Add for FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
impl<T, R> Add for FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
§type Output = FieldValue<T, R>
type Output = FieldValue<T, R>
The resulting type after applying the
+
operator.source§fn add(self, rhs: FieldValue<T, R>) -> FieldValue<T, R>
fn add(self, rhs: FieldValue<T, R>) -> FieldValue<T, R>
Performs the
+
operation. Read moresource§impl<T, R> AddAssign for FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
impl<T, R> AddAssign for FieldValue<T, R>where
T: UIntLike,
R: RegisterLongName,
source§fn add_assign(&mut self, rhs: FieldValue<T, R>)
fn add_assign(&mut self, rhs: FieldValue<T, R>)
Performs the
+=
operation. Read moresource§impl<T, R> Clone for FieldValue<T, R>
impl<T, R> Clone for FieldValue<T, R>
source§fn clone(&self) -> FieldValue<T, R>
fn clone(&self) -> FieldValue<T, R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<T, R> Copy for FieldValue<T, R>
Auto Trait Implementations§
impl<T, R> Freeze for FieldValue<T, R>where
T: Freeze,
impl<T, R> RefUnwindSafe for FieldValue<T, R>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<T, R> Send for FieldValue<T, R>
impl<T, R> Sync for FieldValue<T, R>
impl<T, R> Unpin for FieldValue<T, R>
impl<T, R> UnwindSafe for FieldValue<T, R>where
T: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)