pub struct DropBear<T> { /* private fields */ }
Expand description
A container which fires a notification to a future when it is dropped
Implementations§
Source§impl<T> DropBear<T>
impl<T> DropBear<T>
pub fn new(item: T) -> (Self, DropBearHandle<T>)
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Note that into_inner
will destroy the sender, firing an error to the receiver
Trait Implementations§
Source§impl<T: Ord + PartialOrd> Ord for DropBear<T>
impl<T: Ord + PartialOrd> Ord for DropBear<T>
Source§impl<T: PartialOrd> PartialOrd for DropBear<T>
impl<T: PartialOrd> PartialOrd for DropBear<T>
impl<T: Eq + PartialEq> Eq for DropBear<T>
Auto Trait Implementations§
impl<T> Freeze for DropBear<T>where
T: Freeze,
impl<T> !RefUnwindSafe for DropBear<T>
impl<T> Send for DropBear<T>where
T: Send,
impl<T> Sync for DropBear<T>
impl<T> Unpin for DropBear<T>where
T: Unpin,
impl<T> !UnwindSafe for DropBear<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