pub enum ReallocationError {
AllocationError(AllocationError),
DeallocationError(DeallocationError),
ImproperAlignment,
MarkerFree,
MarkerCorrupted,
NewAllocationFailed,
}Expand description
Errors returned by crate::realloc.
Variants§
AllocationError(AllocationError)
Computing the new size or allocating the new memory failed.
DeallocationError(DeallocationError)
Freeing failed; only LayoutError is reachable, and it signals memory corruption.
ImproperAlignment
The pointer is not properly aligned.
MarkerFree
The pointer points to already freed memory.
MarkerCorrupted
The header matches neither marker: either memory corruption occurred, or the pointer was not produced by this crate.
NewAllocationFailed
The old pointer remains valid and must still be freed by the caller.
Trait Implementations§
Source§impl Clone for ReallocationError
impl Clone for ReallocationError
Source§fn clone(&self) -> ReallocationError
fn clone(&self) -> ReallocationError
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 ReallocationError
impl Debug for ReallocationError
Source§impl Display for ReallocationError
impl Display for ReallocationError
impl Eq for ReallocationError
Source§impl Error for ReallocationError
impl Error for ReallocationError
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<AllocationError> for ReallocationError
impl From<AllocationError> for ReallocationError
Source§fn from(source: AllocationError) -> Self
fn from(source: AllocationError) -> Self
Converts to this type from the input type.
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 PartialEq for ReallocationError
impl PartialEq for ReallocationError
Source§fn eq(&self, other: &ReallocationError) -> bool
fn eq(&self, other: &ReallocationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReallocationError
Auto Trait Implementations§
impl Freeze for ReallocationError
impl RefUnwindSafe for ReallocationError
impl Send for ReallocationError
impl Sync for ReallocationError
impl Unpin for ReallocationError
impl UnsafeUnpin for ReallocationError
impl UnwindSafe for ReallocationError
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