pub enum KernelError {
Show 26 variants
OutOfMemory {
requested: usize,
available: usize,
},
InvalidAddress {
addr: usize,
},
UnmappedMemory {
addr: usize,
},
InvalidCapability {
cap_id: u64,
reason: CapError,
},
InsufficientRights {
required: u16,
actual: u16,
},
CapabilityRevoked {
cap_id: u64,
},
ProcessNotFound {
pid: u64,
},
ThreadNotFound {
tid: u64,
},
InvalidState {
expected: &'static str,
actual: &'static str,
},
IpcError(IpcError),
SchedulerError(SchedError),
SyscallError(SyscallError),
FsError(FsError),
HardwareError {
device: &'static str,
code: u32,
},
InvalidArgument {
name: &'static str,
value: &'static str,
},
OperationNotSupported {
operation: &'static str,
},
ResourceExhausted {
resource: &'static str,
},
PermissionDenied {
operation: &'static str,
},
AlreadyExists {
resource: &'static str,
id: u64,
},
NotFound {
resource: &'static str,
id: u64,
},
Timeout {
operation: &'static str,
duration_ms: u64,
},
NotImplemented {
feature: &'static str,
},
WouldBlock,
BrokenPipe,
NotInitialized {
subsystem: &'static str,
},
LegacyError {
message: &'static str,
},
}Expand description
Main kernel error type
Variants§
OutOfMemory
Memory-related errors
InvalidAddress
Fields
§
addr: usizeUnmappedMemory
Fields
§
addr: usizeInvalidCapability
Capability-related errors
InsufficientRights
CapabilityRevoked
Fields
§
cap_id: u64ProcessNotFound
Process-related errors
Fields
§
pid: u64ThreadNotFound
Fields
§
tid: u64InvalidState
IpcError(IpcError)
IPC-related errors
SchedulerError(SchedError)
Scheduler-related errors
SyscallError(SyscallError)
System call errors
FsError(FsError)
Filesystem-related errors
HardwareError
Hardware errors
InvalidArgument
Generic errors
OperationNotSupported
Fields
§
operation: &'static strResourceExhausted
Fields
§
resource: &'static strPermissionDenied
Fields
§
operation: &'static strAlreadyExists
NotFound
Timeout
NotImplemented
Fields
§
feature: &'static strWouldBlock
Operation would block
BrokenPipe
Broken pipe: write end closed or read end closed
NotInitialized
Subsystem not initialized (called before init())
Fields
§
subsystem: &'static strLegacyError
Legacy string error for gradual migration from &’static str patterns. New code should use specific error variants instead.
Fields
§
message: &'static strTrait Implementations§
Source§impl Clone for KernelError
impl Clone for KernelError
Source§fn clone(&self) -> KernelError
fn clone(&self) -> KernelError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl From<&'static str> for KernelError
Conversion from legacy &’static str errors to KernelError.
impl From<&'static str> for KernelError
Conversion from legacy &’static str errors to KernelError.
This enables gradual migration: functions returning Result<T, &’static str>
can be called with ? from functions returning Result<T, KernelError>.
New code should prefer specific error variants over this conversion.
Source§impl From<BondError> for KernelError
impl From<BondError> for KernelError
Source§impl From<CapError> for KernelError
impl From<CapError> for KernelError
Source§impl From<FsError> for KernelError
impl From<FsError> for KernelError
Source§impl From<IpcError> for KernelError
impl From<IpcError> for KernelError
Source§impl From<SchedError> for KernelError
impl From<SchedError> for KernelError
Source§fn from(err: SchedError) -> Self
fn from(err: SchedError) -> Self
Converts to this type from the input type.
Source§impl From<SyscallError> for KernelError
impl From<SyscallError> for KernelError
Source§fn from(err: SyscallError) -> Self
fn from(err: SyscallError) -> Self
Converts to this type from the input type.
Source§impl From<VmError> for KernelError
impl From<VmError> for KernelError
Source§impl From<WaylandError> for KernelError
impl From<WaylandError> for KernelError
Source§fn from(e: WaylandError) -> Self
fn from(e: WaylandError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KernelError
impl PartialEq for KernelError
impl Copy for KernelError
impl Eq for KernelError
impl StructuralPartialEq for KernelError
Auto Trait Implementations§
impl Freeze for KernelError
impl RefUnwindSafe for KernelError
impl Send for KernelError
impl Sync for KernelError
impl Unpin for KernelError
impl UnwindSafe for KernelError
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)