pub struct FieldValue<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: RegisterLongName> FieldValue<u8, R>
impl<R: RegisterLongName> FieldValue<u8, R>
Source§impl<R: RegisterLongName> FieldValue<u16, R>
impl<R: RegisterLongName> FieldValue<u16, R>
Source§impl<R: RegisterLongName> FieldValue<u32, R>
impl<R: RegisterLongName> FieldValue<u32, R>
Source§impl<R: RegisterLongName> FieldValue<u64, R>
impl<R: RegisterLongName> FieldValue<u64, R>
Source§impl<R: RegisterLongName> FieldValue<u128, R>
impl<R: RegisterLongName> FieldValue<u128, R>
Source§impl<R: RegisterLongName> FieldValue<usize, R>
impl<R: RegisterLongName> FieldValue<usize, R>
Source§impl<T: UIntLike, R: RegisterLongName> FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> FieldValue<T, R>
pub fn none() -> Self
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: UIntLike, R: RegisterLongName> Add for FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> Add for FieldValue<T, R>
Source§impl<T: UIntLike, R: RegisterLongName> AddAssign for FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> AddAssign for FieldValue<T, R>
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: Clone + UIntLike, R: Clone + RegisterLongName> Clone for FieldValue<T, R>
impl<T: Clone + UIntLike, R: Clone + RegisterLongName> 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 moreSource§impl<R: RegisterLongName> From<FieldValue<u128, R>> for u128
impl<R: RegisterLongName> From<FieldValue<u128, R>> for u128
Source§impl<R: RegisterLongName> From<FieldValue<u16, R>> for u16
impl<R: RegisterLongName> From<FieldValue<u16, R>> for u16
Source§impl<R: RegisterLongName> From<FieldValue<u32, R>> for u32
impl<R: RegisterLongName> From<FieldValue<u32, R>> for u32
Source§impl<R: RegisterLongName> From<FieldValue<u64, R>> for u64
impl<R: RegisterLongName> From<FieldValue<u64, R>> for u64
Source§impl<R: RegisterLongName> From<FieldValue<u8, R>> for u8
impl<R: RegisterLongName> From<FieldValue<u8, R>> for u8
Source§impl<R: RegisterLongName> From<FieldValue<usize, R>> for usize
impl<R: RegisterLongName> From<FieldValue<usize, R>> for usize
impl<T: Copy + UIntLike, R: Copy + RegisterLongName> 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