#[non_exhaustive]pub enum ReallocFailure {
InvalidLayout {
new_size: usize,
alignment: usize,
},
InvalidSourceLayout {
requested_size: usize,
alignment: usize,
usable_size: usize,
},
AllocationFailed,
}Expand description
The reason a branded reallocation could not produce a replacement block.
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.
InvalidLayout
new_size and the existing alignment cannot form a valid Layout.
Fields
InvalidSourceLayout
The supplied source layout exceeds the block’s usable capacity or requires an alignment the source pointer does not satisfy.
Fields
AllocationFailed
The requested replacement allocation could not be obtained.
Trait Implementations§
Source§impl Clone for ReallocFailure
impl Clone for ReallocFailure
Source§fn clone(&self) -> ReallocFailure
fn clone(&self) -> ReallocFailure
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 moreimpl Copy for ReallocFailure
Source§impl Debug for ReallocFailure
impl Debug for ReallocFailure
impl Eq for ReallocFailure
Source§impl PartialEq for ReallocFailure
impl PartialEq for ReallocFailure
impl StructuralPartialEq for ReallocFailure
Auto Trait Implementations§
impl Freeze for ReallocFailure
impl RefUnwindSafe for ReallocFailure
impl Send for ReallocFailure
impl Sync for ReallocFailure
impl Unpin for ReallocFailure
impl UnsafeUnpin for ReallocFailure
impl UnwindSafe for ReallocFailure
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