pub struct DropSender<T: Clone>(pub T, _);
Expand description
Implements a cloneable object that will send only one message
on an mpsc::Sender
when its ‘last’ clone is dropped. It will assert
if an attempt to re-clone an already cloned DropSender
happens,
ensuring that the object is only cloned in a linear path.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for DropSender<T>
impl<T: Clone> Clone for DropSender<T>
Auto Trait Implementations§
impl<T> !Freeze for DropSender<T>
impl<T> !RefUnwindSafe for DropSender<T>
impl<T> Send for DropSender<T>where
T: Send,
impl<T> !Sync for DropSender<T>
impl<T> Unpin for DropSender<T>where
T: Unpin,
impl<T> UnwindSafe for DropSender<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