pub struct ReallocError<'brand, T>where
T: ?Sized,{ /* private fields */ }Expand description
A failed branded reallocation that retains ownership of the source block.
The source block is returned inside the error so allocation failure cannot
leak it. Call Self::into_block to recover it, or inspect Self::reason
before deciding how to handle the failure; the recovered block remains
explicitly owned and must be released through the heap when no longer
needed.
Implementations§
Source§impl<'brand, T> ReallocError<'brand, T>where
T: ?Sized,
impl<'brand, T> ReallocError<'brand, T>where
T: ?Sized,
Sourcepub fn reason(&self) -> ReallocFailure
pub fn reason(&self) -> ReallocFailure
Returns the failure classification without consuming the source block.
Sourcepub fn into_block(self) -> BrandedBlock<'brand, T>
pub fn into_block(self) -> BrandedBlock<'brand, T>
Recovers the original source block without dropping or deallocating it.
Trait Implementations§
Auto Trait Implementations§
impl<'brand, T> !Send for ReallocError<'brand, T>
impl<'brand, T> !Sync for ReallocError<'brand, T>
impl<'brand, T> Freeze for ReallocError<'brand, T>
impl<'brand, T> RefUnwindSafe for ReallocError<'brand, T>
impl<'brand, T> Unpin for ReallocError<'brand, T>
impl<'brand, T> UnsafeUnpin for ReallocError<'brand, T>
impl<'brand, T> UnwindSafe for ReallocError<'brand, T>
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