pub trait Sipper<Output, Progress = Output>: Core<Output = Output, Progress = Progress> {
// Provided methods
fn with<F, A>(self, f: F) -> With<Self, F, A> ⓘ
where Self: Sized,
F: FnMut(Progress) -> A { ... }
fn filter_with<F, A>(self, f: F) -> FilterWith<Self, F, A> ⓘ
where Self: Sized,
F: FnMut(Progress) -> Option<A> { ... }
fn sip(&mut self) -> Next<'_, Self> ⓘ
where Self: Unpin { ... }
fn run<S>(self, on_progress: impl Into<Sender<Progress, S>>) -> Run<Self, S> ⓘ
where Self: Sized,
S: Sink<Progress> { ... }
fn pin(self) -> Pin<Box<Self>>
where Self: Sized { ... }
}Expand description
The traits watchdog is driven through (#397), re-exported so a
consumer needs them in scope without taking a direct dependency on
sipper — and so the version this engine speaks is the one it hands out.
A sipper is both a Stream that produces a bunch of progress
and a Future that produces some final output.
Provided Methods§
Sourcefn filter_with<F, A>(self, f: F) -> FilterWith<Self, F, A> ⓘ
fn filter_with<F, A>(self, f: F) -> FilterWith<Self, F, A> ⓘ
Sourcefn sip(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
fn sip(&mut self) -> Next<'_, Self> ⓘwhere
Self: Unpin,
Returns the next progress, if any.
When this method returns None, it means there is no more progress to be made;
and the output is ready.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".