pub struct WatchSender<T> { /* private fields */ }Expand description
Sender half of watch channel
Implementations§
Source§impl<T: Clone> WatchSender<T>
impl<T: Clone> WatchSender<T>
Sourcepub fn send(&self, value: T) -> Result<(), WatchError>
pub fn send(&self, value: T) -> Result<(), WatchError>
Send a new value, notifying all receivers
Sourcepub fn send_modify<F>(&self, modify: F) -> Result<(), WatchError>
pub fn send_modify<F>(&self, modify: F) -> Result<(), WatchError>
Modify the value in place and notify receivers
Sourcepub fn receiver_count(&self) -> usize
pub fn receiver_count(&self) -> usize
Get the number of active receivers
Trait Implementations§
Source§impl<T> Drop for WatchSender<T>
impl<T> Drop for WatchSender<T>
Auto Trait Implementations§
impl<T> Freeze for WatchSender<T>
impl<T> RefUnwindSafe for WatchSender<T>
impl<T> Send for WatchSender<T>
impl<T> Sync for WatchSender<T>
impl<T> Unpin for WatchSender<T>
impl<T> UnsafeUnpin for WatchSender<T>
impl<T> UnwindSafe for WatchSender<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