pub enum StorageError {
AllocError(Layout),
CapacityLimit,
LayoutError(LayoutError),
ProtectionError,
Unsupported,
}
Expand description
An enumeration of error types raised by storage implementations.
Variants§
AllocError(Layout)
A memory allocation failed.
CapacityLimit
The limit of the current allocation was reached.
LayoutError(LayoutError)
The provided layout was not allocatable.
ProtectionError
Memory protection failed.
Unsupported
The requested operation is not supported for this storage.
Implementations§
Trait Implementations§
Source§impl Clone for StorageError
impl Clone for StorageError
Source§fn clone(&self) -> StorageError
fn clone(&self) -> StorageError
Returns a copy 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 StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl From<LayoutError> for StorageError
impl From<LayoutError> for StorageError
Source§fn from(err: LayoutError) -> Self
fn from(err: LayoutError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StorageError
impl PartialEq for StorageError
impl Eq for StorageError
impl StructuralPartialEq for StorageError
Auto Trait Implementations§
impl Freeze for StorageError
impl RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnwindSafe for StorageError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T, A> ToOwnedIn<A> for T
impl<T, A> ToOwnedIn<A> for T
Source§fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
To to create an owned copy of this instance in a given allocation target.
Source§fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
Create an owned copy of this instance in a given allocation target.