pub enum DeallocationError {
CorruptedMarker,
DoubleFree,
ImproperAlignment,
LayoutError(LayoutError),
NullPtr,
}Expand description
Errors returned by crate::free.
Variants§
CorruptedMarker
The header matches neither marker: either memory corruption occurred, or the pointer was not produced by this crate.
DoubleFree
The allocation was already freed.
ImproperAlignment
The pointer is not properly aligned.
LayoutError(LayoutError)
The size stored in the header does not form a valid layout, which signals memory corruption.
NullPtr
The pointer is null.
Trait Implementations§
Source§impl Clone for DeallocationError
impl Clone for DeallocationError
Source§fn clone(&self) -> DeallocationError
fn clone(&self) -> DeallocationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeallocationError
impl Debug for DeallocationError
Source§impl Display for DeallocationError
impl Display for DeallocationError
impl Eq for DeallocationError
Source§impl Error for DeallocationError
impl Error for DeallocationError
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<DeallocationError> for ReallocationError
impl From<DeallocationError> for ReallocationError
Source§fn from(source: DeallocationError) -> Self
fn from(source: DeallocationError) -> Self
Converts to this type from the input type.
Source§impl From<LayoutError> for DeallocationError
impl From<LayoutError> for DeallocationError
Source§fn from(source: LayoutError) -> Self
fn from(source: LayoutError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DeallocationError
impl PartialEq for DeallocationError
Source§fn eq(&self, other: &DeallocationError) -> bool
fn eq(&self, other: &DeallocationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DeallocationError
Auto Trait Implementations§
impl Freeze for DeallocationError
impl RefUnwindSafe for DeallocationError
impl Send for DeallocationError
impl Sync for DeallocationError
impl Unpin for DeallocationError
impl UnsafeUnpin for DeallocationError
impl UnwindSafe for DeallocationError
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