pub struct FreeOnDrop<T>{ /* private fields */ }
Expand description
A wrapper that automatically frees the object when dropped.
Implementations§
Source§impl<T> FreeOnDrop<T>
impl<T> FreeOnDrop<T>
pub unsafe fn new(ptr: T) -> FreeOnDrop<T>
pub fn forget(self) -> T
Trait Implementations§
Source§impl<T> Deref for FreeOnDrop<T>
impl<T> Deref for FreeOnDrop<T>
Source§impl<T> DerefMut for FreeOnDrop<T>
impl<T> DerefMut for FreeOnDrop<T>
Auto Trait Implementations§
impl<T> Freeze for FreeOnDrop<T>where
T: Freeze,
impl<T> RefUnwindSafe for FreeOnDrop<T>where
T: RefUnwindSafe,
impl<T> Send for FreeOnDrop<T>where
T: Send,
impl<T> Sync for FreeOnDrop<T>where
T: Sync,
impl<T> Unpin for FreeOnDrop<T>where
T: Unpin,
impl<T> UnwindSafe for FreeOnDrop<T>where
T: UnwindSafe,
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