Struct tock_registers::fields::FieldValue
source · [−]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
sourceimpl<R: RegisterLongName> FieldValue<u8, R>
impl<R: RegisterLongName> FieldValue<u8, R>
sourceimpl<R: RegisterLongName> FieldValue<u16, R>
impl<R: RegisterLongName> FieldValue<u16, R>
sourceimpl<R: RegisterLongName> FieldValue<u32, R>
impl<R: RegisterLongName> FieldValue<u32, R>
sourceimpl<R: RegisterLongName> FieldValue<u64, R>
impl<R: RegisterLongName> FieldValue<u64, R>
sourceimpl<R: RegisterLongName> FieldValue<u128, R>
impl<R: RegisterLongName> FieldValue<u128, R>
sourceimpl<R: RegisterLongName> FieldValue<usize, R>
impl<R: RegisterLongName> FieldValue<usize, R>
sourceimpl<T: UIntLike, R: RegisterLongName> FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> 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: UIntLike, R: RegisterLongName> Add<FieldValue<T, R>> for FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> Add<FieldValue<T, R>> for FieldValue<T, R>
type Output = FieldValue<T, R>
type Output = FieldValue<T, R>
The resulting type after applying the +
operator.
sourceimpl<T: UIntLike, R: RegisterLongName> AddAssign<FieldValue<T, R>> for FieldValue<T, R>
impl<T: UIntLike, R: RegisterLongName> AddAssign<FieldValue<T, R>> for FieldValue<T, R>
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: Clone + UIntLike, R: Clone + RegisterLongName> Clone for FieldValue<T, R>
impl<T: Clone + UIntLike, R: Clone + RegisterLongName> Clone for FieldValue<T, R>
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
sourceimpl<R: RegisterLongName> From<FieldValue<u128, R>> for u128
impl<R: RegisterLongName> From<FieldValue<u128, R>> for u128
sourcefn from(val: FieldValue<u128, R>) -> u128
fn from(val: FieldValue<u128, R>) -> u128
Converts to this type from the input type.
sourceimpl<R: RegisterLongName> From<FieldValue<u16, R>> for u16
impl<R: RegisterLongName> From<FieldValue<u16, R>> for u16
sourcefn from(val: FieldValue<u16, R>) -> u16
fn from(val: FieldValue<u16, R>) -> u16
Converts to this type from the input type.
sourceimpl<R: RegisterLongName> From<FieldValue<u32, R>> for u32
impl<R: RegisterLongName> From<FieldValue<u32, R>> for u32
sourcefn from(val: FieldValue<u32, R>) -> u32
fn from(val: FieldValue<u32, R>) -> u32
Converts to this type from the input type.
sourceimpl<R: RegisterLongName> From<FieldValue<u64, R>> for u64
impl<R: RegisterLongName> From<FieldValue<u64, R>> for u64
sourcefn from(val: FieldValue<u64, R>) -> u64
fn from(val: FieldValue<u64, R>) -> u64
Converts to this type from the input type.
sourceimpl<R: RegisterLongName> From<FieldValue<u8, R>> for u8
impl<R: RegisterLongName> From<FieldValue<u8, R>> for u8
sourcefn from(val: FieldValue<u8, R>) -> u8
fn from(val: FieldValue<u8, R>) -> u8
Converts to this type from the input type.
sourceimpl<R: RegisterLongName> From<FieldValue<usize, R>> for usize
impl<R: RegisterLongName> From<FieldValue<usize, R>> for usize
sourcefn from(val: FieldValue<usize, R>) -> usize
fn from(val: FieldValue<usize, R>) -> usize
Converts to this type from the input type.
impl<T: Copy + UIntLike, R: Copy + RegisterLongName> Copy for FieldValue<T, R>
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