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
sourceimpl<R> FieldValue<u8, R> where
R: RegisterLongName,
impl<R> FieldValue<u8, R> where
R: RegisterLongName,
sourceimpl<R> FieldValue<u16, R> where
R: RegisterLongName,
impl<R> FieldValue<u16, R> where
R: RegisterLongName,
sourceimpl<R> FieldValue<u32, R> where
R: RegisterLongName,
impl<R> FieldValue<u32, R> where
R: RegisterLongName,
sourceimpl<R> FieldValue<u64, R> where
R: RegisterLongName,
impl<R> FieldValue<u64, R> where
R: RegisterLongName,
sourceimpl<R> FieldValue<u128, R> where
R: RegisterLongName,
impl<R> FieldValue<u128, R> where
R: RegisterLongName,
sourceimpl<R> FieldValue<usize, R> where
R: RegisterLongName,
impl<R> FieldValue<usize, R> where
R: RegisterLongName,
sourceimpl<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 matches_any(&self, val: T) -> bool
pub fn matches_any(&self, val: T) -> bool
Check if any specified parts of a field match
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
sourceimpl<T, R> Add<FieldValue<T, R>> for FieldValue<T, R> where
T: UIntLike,
R: RegisterLongName,
impl<T, R> Add<FieldValue<T, R>> 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.
sourcefn add(self, rhs: FieldValue<T, R>) -> FieldValue<T, R>
fn add(self, rhs: FieldValue<T, R>) -> FieldValue<T, R>
Performs the +
operation. Read more
sourceimpl<T, R> AddAssign<FieldValue<T, R>> for FieldValue<T, R> where
T: UIntLike,
R: RegisterLongName,
impl<T, R> AddAssign<FieldValue<T, R>> for FieldValue<T, R> where
T: UIntLike,
R: RegisterLongName,
sourcefn add_assign(&mut self, rhs: FieldValue<T, R>)
fn add_assign(&mut self, rhs: FieldValue<T, R>)
Performs the +=
operation. Read more
sourceimpl<T, R> Clone for FieldValue<T, R> where
T: Clone + UIntLike,
R: Clone + RegisterLongName,
impl<T, R> Clone for FieldValue<T, R> where
T: Clone + UIntLike,
R: Clone + RegisterLongName,
sourcefn clone(&self) -> FieldValue<T, R>
fn clone(&self) -> FieldValue<T, R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T, R> Copy for FieldValue<T, R> where
T: Copy + UIntLike,
R: Copy + RegisterLongName,
Auto Trait Implementations
impl<T, R> RefUnwindSafe for FieldValue<T, R> where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, R> Send for FieldValue<T, R> where
R: Send,
T: Send,
impl<T, R> Sync for FieldValue<T, R> where
R: Sync,
T: Sync,
impl<T, R> Unpin for FieldValue<T, R> where
R: Unpin,
T: Unpin,
impl<T, R> UnwindSafe for FieldValue<T, R> where
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more