#[repr(transparent)]pub struct ReadOnly<T, R = ()>where
T: UIntLike,
R: RegisterLongName,{ /* private fields */ }
Expand description
Read-only registers.
For accessing the register contents the Readable
trait is
implemented.
Trait Implementations§
source§impl<T, R> Readable for ReadOnly<T, R>where
T: UIntLike,
R: RegisterLongName,
impl<T, R> Readable for ReadOnly<T, R>where T: UIntLike, R: RegisterLongName,
type T = T
type R = R
source§fn read_as_enum<E>(&self, field: Field<Self::T, Self::R>) -> Option<E>where
E: TryFromValue<Self::T, EnumType = E>,
fn read_as_enum<E>(&self, field: Field<Self::T, Self::R>) -> Option<E>where E: TryFromValue<Self::T, EnumType = E>,
Set the raw register value Read more
source§fn is_set(&self, field: Field<Self::T, Self::R>) -> bool
fn is_set(&self, field: Field<Self::T, Self::R>) -> bool
Check if one or more bits in a field are set
source§fn any_matching_bits_set(&self, field: FieldValue<Self::T, Self::R>) -> bool
fn any_matching_bits_set(&self, field: FieldValue<Self::T, Self::R>) -> bool
Check if any bits corresponding to the mask in the passed
FieldValue
are set.
This function is identical to is_set()
but operates on a FieldValue
rather
than a Field
, allowing for checking if any bits are set across multiple,
non-contiguous portions of a bitfield.source§fn matches_all(&self, field: FieldValue<Self::T, Self::R>) -> bool
fn matches_all(&self, field: FieldValue<Self::T, Self::R>) -> bool
Check if all specified parts of a field match
source§fn matches_any(&self, fields: &[FieldValue<Self::T, Self::R>]) -> bool
fn matches_any(&self, fields: &[FieldValue<Self::T, Self::R>]) -> bool
Check if any of the passed parts of a field exactly match the contained
value. This allows for matching on unset bits, or matching on specific values
in multi-bit fields.
Auto Trait Implementations§
impl<T, R> RefUnwindSafe for ReadOnly<T, R>where R: RefUnwindSafe, T: RefUnwindSafe,
impl<T, R> Send for ReadOnly<T, R>where R: Send, T: Send,
impl<T, R> Sync for ReadOnly<T, R>where R: Sync, T: Sync,
impl<T, R> Unpin for ReadOnly<T, R>where R: Unpin, T: Unpin,
impl<T, R> UnwindSafe for ReadOnly<T, R>where R: UnwindSafe, T: 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