Struct watch::WatchReceiver[][src]

pub struct WatchReceiver<T> { /* fields omitted */ }

The receiver for the watch channel.

The receiver can be cloned. Each clone will yield a new receiver that receives the same messages.

Implementations

impl<T: Clone> WatchReceiver<T>[src]

pub fn get(&mut self) -> T[src]

Get a clone of the latest value sent on the channel.

pub fn get_if_new(&mut self) -> Option<T>[src]

Get a clone of the latest value if that value has not previously been seen by this receiver.

pub fn wait(&mut self) -> T[src]

This method waits until a new value becomes available and return a clone of it.

impl<T> WatchReceiver<T>[src]

pub fn new_sender(&self) -> WatchSender<T>[src]

Create a new sender for this channel.

Trait Implementations

impl<T> Clone for WatchReceiver<T>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.