Enum probe_rs::architecture::arm::ap::AccessPortError
source · [−]pub enum AccessPortError {
MemoryNotAligned {
address: u64,
alignment: usize,
},
RegisterRead {
address: u8,
name: &'static str,
source: Box<dyn Error + Send + Sync>,
},
RegisterWrite {
address: u8,
name: &'static str,
source: Box<dyn Error + Send + Sync>,
},
OutOfBounds,
DebugPort(DebugPortError),
Flush(DebugProbeError),
}
Expand description
Some error during AP handling occurred.
Variants
MemoryNotAligned
Fields
address: u64
The address of the register.
alignment: usize
The required alignment in bytes (address increments).
The given register address to perform an access on was not memory aligned.
Make sure it is aligned to the size of the access (address & access_size == 0
).
RegisterRead
An error occurred when trying to read a register.
RegisterWrite
An error occurred when trying to write a register.
OutOfBounds
A region ouside of the AP address space was accessed.
DebugPort(DebugPortError)
Some error with the operation of the APs DP occurred.
Flush(DebugProbeError)
An error occurred when trying to flush batched writes of to the AP.
Implementations
sourceimpl AccessPortError
impl AccessPortError
sourcepub fn register_read_error<R: Register, E: Error + Send + Sync + 'static>(
source: E
) -> Self
pub fn register_read_error<R: Register, E: Error + Send + Sync + 'static>(
source: E
) -> Self
Constructs a AccessPortError::RegisterRead
from just the source error and the register type.
sourcepub fn register_write_error<R: Register, E: Error + Send + Sync + 'static>(
source: E
) -> Self
pub fn register_write_error<R: Register, E: Error + Send + Sync + 'static>(
source: E
) -> Self
Constructs a AccessPortError::RegisterWrite
from just the source error and the register type.
sourcepub fn alignment_error(address: u64, alignment: usize) -> Self
pub fn alignment_error(address: u64, alignment: usize) -> Self
Constructs a AccessPortError::MemoryNotAligned
from the address and the required alignment.
Trait Implementations
sourceimpl Debug for AccessPortError
impl Debug for AccessPortError
sourceimpl Display for AccessPortError
impl Display for AccessPortError
sourceimpl Error for AccessPortError
impl Error for AccessPortError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<AccessPortError> for Error
impl From<AccessPortError> for Error
sourcefn from(err: AccessPortError) -> Self
fn from(err: AccessPortError) -> Self
Converts to this type from the input type.
sourceimpl From<DebugPortError> for AccessPortError
impl From<DebugPortError> for AccessPortError
sourcefn from(source: DebugPortError) -> Self
fn from(source: DebugPortError) -> Self
Converts to this type from the input type.
sourceimpl From<DebugProbeError> for AccessPortError
impl From<DebugProbeError> for AccessPortError
sourcefn from(source: DebugProbeError) -> Self
fn from(source: DebugProbeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for AccessPortError
impl Send for AccessPortError
impl Sync for AccessPortError
impl Unpin for AccessPortError
impl !UnwindSafe for AccessPortError
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