pub struct ProgressSink(/* private fields */);Expand description
An output seen only as a place to pass progress on, for cursors over a contract. A cursor
passes the progress it meets inside a frame on through it, held back to what the decoder
has read through the cursor and not reported yet: what it consumed since it last took the
provenance (consumed()), and what it says it still holds (ProgressSink::hold) when
it took provenance early for an event still to come. Made by Outbox::progress_sink;
clones share their state.
Implementations§
Source§impl ProgressSink
impl ProgressSink
Sourcepub fn progress(&self, tick: Tick) -> impl Future<Output = ()>
pub fn progress(&self, tick: Tick) -> impl Future<Output = ()>
Passes Progress(tick) on, waiting for budget and for room like Outbox::progress;
a tick at or before one already passed on is not sent again.
Sourcepub fn hold(&self, from: Option<Tick>)
pub fn hold(&self, from: Option<Tick>)
Tells from which tick on the decoder still holds items it read through a cursor and
has not reported — provenance it took early for an event still to come, such as a batch
being filled — so that progress met inside a frame is held back to there; None once
nothing is held. A decoder that takes provenance only when it emits never needs this.
Sourcepub fn held(&self) -> Option<Tick>
pub fn held(&self) -> Option<Tick>
From where the decoder says it still holds items; see ProgressSink::hold.
Trait Implementations§
Source§impl Clone for ProgressSink
impl Clone for ProgressSink
Source§fn clone(&self) -> ProgressSink
fn clone(&self) -> ProgressSink
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more