pub enum MemoryError {
AllocationError {
message: String,
size: usize,
position: Option<Position>,
},
OutOfMemory {
requested: usize,
available: usize,
position: Option<Position>,
},
GarbageCollectionError {
message: String,
position: Option<Position>,
},
InvalidPointer {
pointer: usize,
message: String,
position: Option<Position>,
},
MemoryCorruption {
address: usize,
message: String,
position: Option<Position>,
},
HeapFull {
message: String,
position: Option<Position>,
},
InvalidAllocation {
size: usize,
alignment: usize,
position: Option<Position>,
},
FragmentationError {
message: String,
position: Option<Position>,
},
}Variants§
AllocationError
OutOfMemory
GarbageCollectionError
InvalidPointer
MemoryCorruption
HeapFull
InvalidAllocation
FragmentationError
Trait Implementations§
Source§impl Clone for MemoryError
impl Clone for MemoryError
Source§fn clone(&self) -> MemoryError
fn clone(&self) -> MemoryError
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 MemoryError
impl Debug for MemoryError
Source§impl<'de> Deserialize<'de> for MemoryError
impl<'de> Deserialize<'de> for MemoryError
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnwindSafe for MemoryError
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