pub enum IoError {
BufferTooBig {
size: u64,
backtrace: BackTrace,
},
OutOfMemory {
size: u64,
backtrace: BackTrace,
},
PoolCapacityExceeded {
size: u64,
capacity: u64,
in_use: u64,
backtrace: BackTrace,
},
UnsupportedStrides {
backtrace: BackTrace,
},
NotFound {
backtrace: BackTrace,
reason: Reason,
},
StorageHandleNotFound {
reason: Reason,
backtrace: BackTrace,
},
StorageMappingFailed {
size: u64,
source: Box<IoError>,
backtrace: BackTrace,
},
FreeError {
backtrace: BackTrace,
},
Unknown {
description: String,
backtrace: BackTrace,
},
UnsupportedIoOperation {
backtrace: BackTrace,
},
Execution(Box<ServerError>),
}Expand description
Error returned from create/read/write functions. Due to async execution not all errors
are able to be caught, so some IO errors will still panic.
Variants§
BufferTooBig
Buffer size exceeds the max available
OutOfMemory
The device had no memory left for this allocation.
Unlike IoError::BufferTooBig (the allocation can never fit), this
describes the device at one moment: pool pages whose slices have all
been dropped are still resident, and the frees that would release them
may not have reached the driver yet. Reclaiming and retrying is a
reasonable response, which is why a storage backend must not report a
driver out-of-memory as BufferTooBig: that tells every caller the
allocation is hopeless when it is merely untimely.
Fields
PoolCapacityExceeded
A memory pool with a fixed capacity cap is exhausted.
Unlike IoError::BufferTooBig (the allocation can never fit), this
means the working set exceeded the configured budget. Server execution
paths treat it as fatal — the budget is a hard contract, so failing
early beats silently growing — but callers that manage their own
working set may free pool memory and retry.
Fields
UnsupportedStrides
Strides aren’t supported for this copy operation on this runtime
NotFound
Memory wasn’t found in the memory pool
StorageHandleNotFound
The storage backend holds no allocation for a handle’s storage id.
One layer below IoError::NotFound: there the memory manager could
not route a binding to a slice, here the routing succeeded and the
allocation the slice names is gone. A handle outliving its page, or a
storage id a deallocation retired, reaches the storage this way.
Fields
StorageMappingFailed
An allocation carved lazily under a DryRun
could not be given real device backing when it was finally resolved.
Distinct from the same failure at reservation time, and the distinction is what a caller acts on: the memory was promised earlier, by a pass that measured a plan without paying for it, and is only now being charged for. A plan whose replay hits this was measured against more device memory than the replay has — warm the tune caches first, or measure a smaller one.
Fields
FreeError
Handle wasn’t found in the memory pool
Unknown
Unknown error happened during execution
UnsupportedIoOperation
The current IO operation is not supported
Execution(Box<ServerError>)
Can’t perform the IO operation because of a runtime error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IoError
impl<'de> Deserialize<'de> for IoError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Error for IoError
impl Error for IoError
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()
Source§impl From<Box<ServerError>> for IoError
impl From<Box<ServerError>> for IoError
Source§fn from(source: Box<ServerError>) -> Self
fn from(source: Box<ServerError>) -> Self
Source§impl From<IoError> for LaunchError
impl From<IoError> for LaunchError
Source§impl From<IoError> for ServerError
impl From<IoError> for ServerError
Auto Trait Implementations§
impl Freeze for IoError
impl RefUnwindSafe for IoError
impl Send for IoError
impl Sync for IoError
impl Unpin for IoError
impl UnsafeUnpin for IoError
impl UnwindSafe for IoError
Blanket Implementations§
impl<T> AnyError for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more