pub struct Tuple<S: Watcher, T: Watcher> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<S: Watcher, T: Watcher> Watcher for Tuple<S, T>
impl<S: Watcher, T: Watcher> Watcher for Tuple<S, T>
Source§type Value = (<S as Watcher>::Value, <T as Watcher>::Value)
type Value = (<S as Watcher>::Value, <T as Watcher>::Value)
The type of value that can change. Read more
Source§fn update(&mut self) -> bool
fn update(&mut self) -> bool
Updates the watcher to the latest value and returns whether it changed. Read more
Source§fn peek(&self) -> &Self::Value
fn peek(&self) -> &Self::Value
Returns a reference to the value currently stored in the watcher. Read more
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Source§fn poll_updated(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Disconnected>>
fn poll_updated( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Disconnected>>
Polls for the next value, or returns
Disconnected if one of the underlying
Watchables has been dropped.Source§fn get(&mut self) -> Self::Value
fn get(&mut self) -> Self::Value
Updates the watcher to the latest value and returns that value. Read more
Source§fn updated(&mut self) -> NextFut<'_, Self> ⓘ
fn updated(&mut self) -> NextFut<'_, Self> ⓘ
Returns a future completing with
Ok(value) once a new value is set, or with
Err(Disconnected) if the connected Watchable was dropped. Read moreSource§fn initialized<T, W>(&mut self) -> InitializedFut<'_, T, W, Self> ⓘ
fn initialized<T, W>(&mut self) -> InitializedFut<'_, T, W, Self> ⓘ
Source§fn stream(self) -> Stream<Self>where
Self: Unpin,
fn stream(self) -> Stream<Self>where
Self: Unpin,
Returns a stream which will yield the most recent values as items. Read more
Source§fn stream_updates_only(self) -> Stream<Self>where
Self: Unpin,
fn stream_updates_only(self) -> Stream<Self>where
Self: Unpin,
Returns a stream which will yield the most recent values as items, starting from
the next unobserved future value. Read more
Auto Trait Implementations§
impl<S, T> Freeze for Tuple<S, T>
impl<S, T> RefUnwindSafe for Tuple<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
<S as Watcher>::Value: RefUnwindSafe,
<T as Watcher>::Value: RefUnwindSafe,
impl<S, T> Send for Tuple<S, T>
impl<S, T> Sync for Tuple<S, T>
impl<S, T> Unpin for Tuple<S, T>
impl<S, T> UnwindSafe for Tuple<S, T>where
S: UnwindSafe,
T: UnwindSafe,
<S as Watcher>::Value: UnwindSafe,
<T as Watcher>::Value: UnwindSafe,
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