pub struct TaskWatcher<T> { /* private fields */ }Expand description
Tracks a set of futures and reports when each of them exits, i.e. completes or is dropped.
Every future wrapped via watch reports its exit exactly once: either when it
completes or when it is dropped before completion, whichever happens first. Note that when a
future is dropped before completion, the exit is reported before the inner future itself is
dropped.
Once all futures have been wrapped, call into_exits to get a stream
of Exits. The stream ends after every watched future has exited.
Implementations§
Source§impl<T> TaskWatcher<T>
impl<T> TaskWatcher<T>
Trait Implementations§
Source§impl<T: Debug> Debug for TaskWatcher<T>
impl<T: Debug> Debug for TaskWatcher<T>
Auto Trait Implementations§
impl<T> Freeze for TaskWatcher<T>
impl<T> RefUnwindSafe for TaskWatcher<T>
impl<T> Send for TaskWatcher<T>
impl<T> Sync for TaskWatcher<T>
impl<T> Unpin for TaskWatcher<T>
impl<T> UnsafeUnpin for TaskWatcher<T>
impl<T> UnwindSafe for TaskWatcher<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