#[non_exhaustive]pub enum ContiguousMemoryError {
NoStorageLeft,
AlreadyUsed,
NotContained,
DoubleFree,
Unshrinkable {
required_size: usize,
},
Lock(LockingError),
Layout(LayoutError),
BorrowMut(RegionBorrowedError),
}
Expand description
Represents errors that can occur while using the
ContiguousMemoryStorage
container.
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.
NoStorageLeft
Tried to store data that does not fit into any of the remaining free memory regions.
AlreadyUsed
Attempted to occupy a memory region that is already marked as taken.
NotContained
Attempted to operate on a memory region that is not contained within the
AllocationTracker
.
DoubleFree
Attempted to free memory that has already been deallocated.
Unshrinkable
The AllocationTracker
does not
allow shrinking to the expected size.
Lock(LockingError)
Indicates that a mutex wasn’t lockable.
Layout(LayoutError)
Indicates that the provided Layout
is invalid.
Tuple Fields
§
0: LayoutError
The underlying error that caused the Layout
to be considered invalid.
BorrowMut(RegionBorrowedError)
Tried mutably borrowing already borrowed region of memory
Trait Implementations§
Source§impl Debug for ContiguousMemoryError
impl Debug for ContiguousMemoryError
Source§impl Display for ContiguousMemoryError
Available on non-crate feature no_std
or crate feature error_in_core
only.
impl Display for ContiguousMemoryError
Available on non-crate feature
no_std
or crate feature error_in_core
only.Source§impl Error for ContiguousMemoryError
Available on non-crate feature no_std
or crate feature error_in_core
only.
impl Error for ContiguousMemoryError
Available on non-crate feature
no_std
or crate feature error_in_core
only.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 From<LayoutError> for ContiguousMemoryError
impl From<LayoutError> for ContiguousMemoryError
Source§fn from(layout_err: LayoutError) -> Self
fn from(layout_err: LayoutError) -> Self
Converts to this type from the input type.
Source§impl From<LockingError> for ContiguousMemoryError
impl From<LockingError> for ContiguousMemoryError
Source§fn from(layout_err: LockingError) -> Self
fn from(layout_err: LockingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContiguousMemoryError
impl RefUnwindSafe for ContiguousMemoryError
impl Send for ContiguousMemoryError
impl Sync for ContiguousMemoryError
impl Unpin for ContiguousMemoryError
impl UnwindSafe for ContiguousMemoryError
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