pub enum Error {
}Expand description
Error types for OSAL-RS operations.
Represents all possible error conditions that can occur when using the OSAL-RS library.
§Examples
ⓘ
use osal_rs::os::{Queue, QueueFn};
use osal_rs::utils::Error;
match Queue::new(10, 32) {
Ok(queue) => { /* use queue */ },
Err(Error::OutOfMemory) => println!("Failed to allocate queue"),
Err(e) => println!("Other error: {:?}", e),
}Variants§
OutOfMemory
Insufficient memory to complete operation
QueueSendTimeout
Queue send operation timed out
QueueReceiveTimeout
Queue receive operation timed out
MutexTimeout
Mutex operation timed out
MutexLockFailed
Failed to acquire mutex lock
Timeout
Generic timeout error
QueueFull
Queue is full and cannot accept more items
StringConversionError
String conversion failed
TaskNotFound
Thread/task not found
InvalidQueueSize
Invalid queue size specified
NullPtr
Null pointer encountered
NotFound
Requested item not found
OutOfIndex
Index out of bounds
InvalidType
Invalid type for operation
Empty
No data available
WriteError
Write error occurred
ReadError
Read error occurred
ReturnWithCode(i32)
Return error with code
Unhandled(&'static str)
Unhandled error with description
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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