Struct watch::WatchReceiver
source · [−]pub struct WatchReceiver<T> { /* private fields */ }
Expand description
The receiver for the watch channel.
The receiver can be cloned. Each clone will yield a new receiver that receives the same messages.
Implementations
sourceimpl<T: Clone> WatchReceiver<T>
impl<T: Clone> WatchReceiver<T>
sourcepub fn get_if_new(&mut self) -> Option<T>
pub fn get_if_new(&mut self) -> Option<T>
Get a clone of the latest value if that value has not previously been seen by this receiver.
sourceimpl<T> WatchReceiver<T>
impl<T> WatchReceiver<T>
sourcepub fn new_sender(&self) -> WatchSender<T>
pub fn new_sender(&self) -> WatchSender<T>
Create a new sender for this channel.
Trait Implementations
sourceimpl<T> Clone for WatchReceiver<T>
impl<T> Clone for WatchReceiver<T>
sourcefn clone(&self) -> WatchReceiver<T>
fn clone(&self) -> WatchReceiver<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for WatchReceiver<T>
impl<T> Send for WatchReceiver<T> where
T: Send,
impl<T> Sync for WatchReceiver<T> where
T: Send,
impl<T> Unpin for WatchReceiver<T>
impl<T> !UnwindSafe for WatchReceiver<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more