Enum probe_rs::RegisterValue
source · pub enum RegisterValue {
U32(u32),
U64(u64),
U128(u128),
}
Expand description
A value of a core register
Creating a new RegisterValue
should be done using From or Into.
Converting a value back to a primitive type can be done with either
a match arm or TryInto
Variants§
U32(u32)
32-bit unsigned integer
U64(u64)
64-bit unsigned integer
U128(u128)
128-bit unsigned integer, often used with SIMD / FP
Implementations§
source§impl RegisterValue
impl RegisterValue
sourcepub fn incremenet_address(&mut self, bytes: usize) -> Result<(), Error>
pub fn incremenet_address(&mut self, bytes: usize) -> Result<(), Error>
A helper function to increment an address by a fixed number of bytes.
sourcepub fn is_max_value(&self) -> bool
pub fn is_max_value(&self) -> bool
A helper function to determine if the contained register value is equal to the maximum value that can be stored in that datatype.
Trait Implementations§
source§impl Clone for RegisterValue
impl Clone for RegisterValue
source§fn clone(&self) -> RegisterValue
fn clone(&self) -> RegisterValue
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 Debug for RegisterValue
impl Debug for RegisterValue
source§impl Default for RegisterValue
impl Default for RegisterValue
source§impl Display for RegisterValue
impl Display for RegisterValue
source§impl From<u128> for RegisterValue
impl From<u128> for RegisterValue
source§impl From<u32> for RegisterValue
impl From<u32> for RegisterValue
source§impl From<u64> for RegisterValue
impl From<u64> for RegisterValue
source§impl PartialEq<RegisterValue> for RegisterValue
impl PartialEq<RegisterValue> for RegisterValue
source§impl PartialOrd<RegisterValue> for RegisterValue
impl PartialOrd<RegisterValue> for RegisterValue
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more