#[non_exhaustive]pub enum EmbeddedError {
Show 17 variants
AllocationFailed,
PoolExhausted,
BufferTooSmall {
required: usize,
available: usize,
},
InvalidAlignment {
required: usize,
actual: usize,
},
UnsupportedOperation,
InvalidParameter,
OutOfBounds {
index: usize,
max: usize,
},
PowerModeTransitionFailed,
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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
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
Returns a duplicate 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 EmbeddedError
impl Debug for EmbeddedError
Source§impl Display for EmbeddedError
impl Display for EmbeddedError
Source§impl Error for EmbeddedError
Available on crate feature std only.
impl Error for EmbeddedError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for EmbeddedError
impl PartialEq for EmbeddedError
impl Copy for EmbeddedError
impl Eq for EmbeddedError
impl StructuralPartialEq for EmbeddedError
Auto Trait Implementations§
impl Freeze for EmbeddedError
impl RefUnwindSafe for EmbeddedError
impl Send for EmbeddedError
impl Sync for EmbeddedError
impl Unpin for EmbeddedError
impl UnsafeUnpin for EmbeddedError
impl UnwindSafe for EmbeddedError
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