Struct just_watch::Sender
source · pub struct Sender<T> { /* private fields */ }
Expand description
Implementations§
source§impl<T> Sender<T>
impl<T> Sender<T>
sourcepub fn send(&self, value: T) -> Result<(), SendError<T>>
pub fn send(&self, value: T) -> Result<(), SendError<T>>
Sends a new value via the channel, notifying all receivers.
sourcepub fn send_modify<F>(&self, func: F)where
F: FnOnce(&mut T),
pub fn send_modify<F>(&self, func: F)where F: FnOnce(&mut T),
Applies a function to the existing value.
A function gets a mutable reference that can be used to change a stored value.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>where T: Send + Sync,
impl<T> Sync for Sender<T>where T: Send + Sync,
impl<T> Unpin for Sender<T>
impl<T> UnwindSafe for Sender<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