pub struct DropNotifyWatchSender<T: DropNotifyEofSignallable>(Option<Sender<T>>);
Expand description
Wrapper for postage::watch::Sender
that sends DropNotifyEof::eof()
when dropped
Derefs to the inner Sender
.
Ideally this would be behaviour promised by upstream, or something See https://github.com/austinjones/postage-rs/issues/57.
Tuple Fields§
§0: Option<Sender<T>>
Implementations§
Source§impl<T: DropNotifyEofSignallable> DropNotifyWatchSender<T>
impl<T: DropNotifyEofSignallable> DropNotifyWatchSender<T>
Sourcepub fn into_inner(self) -> Sender<T>
pub fn into_inner(self) -> Sender<T>
Unwrap the inner sender, defusing the drop notification
Methods from Deref<Target = Sender<T>>§
pub fn borrow_mut<'s>(&'s mut self) -> RefMut<'s, T>
pub fn borrow_mut<'s>(&'s mut self) -> RefMut<'s, T>
Mutably borrows the contained value, blocking the channel while the borrow is held.
After the borrow is released, receivers will be notified of a new value.
pub fn subscribe(&mut self) -> Receiver<T>
pub fn subscribe(&mut self) -> Receiver<T>
Creates a new Receiver that listens to this channel.
pub fn borrow<'s>(&'s mut self) -> Ref<'s, T>
pub fn borrow<'s>(&'s mut self) -> Ref<'s, T>
Immutably borrows the contained value, blocking the channel while the borrow is held.
Trait Implementations§
Source§impl<T: Debug + DropNotifyEofSignallable> Debug for DropNotifyWatchSender<T>
impl<T: Debug + DropNotifyEofSignallable> Debug for DropNotifyWatchSender<T>
Source§impl<T: DropNotifyEofSignallable> Deref for DropNotifyWatchSender<T>
impl<T: DropNotifyEofSignallable> Deref for DropNotifyWatchSender<T>
Source§impl<T: DropNotifyEofSignallable> DerefMut for DropNotifyWatchSender<T>
impl<T: DropNotifyEofSignallable> DerefMut for DropNotifyWatchSender<T>
Source§impl<T: DropNotifyEofSignallable> Drop for DropNotifyWatchSender<T>
impl<T: DropNotifyEofSignallable> Drop for DropNotifyWatchSender<T>
Auto Trait Implementations§
impl<T> Freeze for DropNotifyWatchSender<T>
impl<T> !RefUnwindSafe for DropNotifyWatchSender<T>
impl<T> Send for DropNotifyWatchSender<T>
impl<T> Sync for DropNotifyWatchSender<T>
impl<T> Unpin for DropNotifyWatchSender<T>
impl<T> !UnwindSafe for DropNotifyWatchSender<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