#[non_exhaustive]pub enum EmbeddedError {
Show 18 variants
AllocationFailed,
PoolExhausted,
BufferTooSmall {
required: usize,
available: usize,
},
InvalidAlignment {
required: usize,
actual: usize,
},
UnsupportedOperation,
InvalidParameter,
OutOfBounds {
index: usize,
max: usize,
},
PowerModeTransitionFailed,
NoPowerController,
DeadlineMissed {
actual_us: u64,
deadline_us: u64,
},
ResourceBusy,
Timeout,
InitializationFailed,
HardwareError,
InvalidState,
FormatError,
ChecksumMismatch,
TargetSpecific(u8),
}Expand description
Error types for embedded OxiGDAL operations
Designed to be lightweight and suitable for no_std environments
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AllocationFailed
Memory allocation failed
PoolExhausted
Memory pool exhausted
BufferTooSmall
Buffer too small for operation
InvalidAlignment
Invalid buffer alignment
UnsupportedOperation
Operation not supported in current configuration
InvalidParameter
Invalid parameter provided
OutOfBounds
Out of bounds access
PowerModeTransitionFailed
Power mode transition failed
NoPowerController
A real hardware power transition was requested but no board-support
PowerController is installed (see the power module).
This is returned only by the strict transition APIs (e.g.
PowerManager::request_mode_strict). It exists so callers that genuinely
need silicon-level control can fail loudly instead of silently recording a
mode change that never reached hardware.
DeadlineMissed
Real-time deadline missed
ResourceBusy
Resource busy
Timeout
Timeout occurred
InitializationFailed
Initialization failed
HardwareError
Hardware error
InvalidState
Invalid state for operation
FormatError
Data format error
ChecksumMismatch
Checksum mismatch
TargetSpecific(u8)
Target-specific error
Implementations§
Source§impl EmbeddedError
impl EmbeddedError
Sourcepub const fn is_recoverable(&self) -> bool
pub const fn is_recoverable(&self) -> bool
Returns true if the error is recoverable
Sourcepub const fn is_resource_exhaustion(&self) -> bool
pub const fn is_resource_exhaustion(&self) -> bool
Returns true if the error is a resource exhaustion error
Sourcepub const fn is_validation_error(&self) -> bool
pub const fn is_validation_error(&self) -> bool
Returns true if the error is a validation error
Sourcepub const fn error_code(&self) -> u32
pub const fn error_code(&self) -> u32
Returns the error code as a u32 for FFI boundaries
Trait Implementations§
Source§impl Clone for EmbeddedError
impl Clone for EmbeddedError
Source§fn clone(&self) -> EmbeddedError
fn clone(&self) -> EmbeddedError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EmbeddedError
Source§impl Debug for EmbeddedError
impl Debug for EmbeddedError
Source§impl Display for EmbeddedError
impl Display for EmbeddedError
impl Eq for EmbeddedError
Source§impl Error for EmbeddedError
Available on crate feature std only.
impl Error for EmbeddedError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()