pub struct SyncDrop<T: Debug + AsyncDrop>(/* private fields */);
Expand description
SyncDrop wraps an AsyncDropGuard and calls AsyncDropGuard::async_drop
on it in its
synchronous Drop destructor.
WARNING: This can cause deadlocks, see https://stackoverflow.com/questions/71541765/rust-async-drop
Implementations§
Source§impl<T: Debug + AsyncDrop> SyncDrop<T>
impl<T: Debug + AsyncDrop> SyncDrop<T>
pub fn new(v: AsyncDropGuard<T>) -> Self
pub fn into_inner_dont_drop(self) -> AsyncDropGuard<T>
pub fn inner(&self) -> &AsyncDropGuard<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SyncDrop<T>where
T: Freeze,
impl<T> RefUnwindSafe for SyncDrop<T>where
T: RefUnwindSafe,
impl<T> Send for SyncDrop<T>where
T: Send,
impl<T> Sync for SyncDrop<T>where
T: Sync,
impl<T> Unpin for SyncDrop<T>where
T: Unpin,
impl<T> UnwindSafe for SyncDrop<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