pub struct ProgressCursor { /* private fields */ }Expand description
The furthest progress reported for one request so far.
One per in-flight request, held on the in-flight entry, so it is dropped exactly when the request is — there is no table of stale cursors to age out.
Implementations§
Source§impl ProgressCursor
impl ProgressCursor
Sourcepub fn advance(&mut self, update: &ProgressUpdate) -> bool
pub fn advance(&mut self, update: &ProgressUpdate) -> bool
Records an update and says whether it should go on the wire.
false for an update that does not move the cursor forward. The first
update always moves it, including one reporting 0.0, because a request
that said “tell me about this” is owed at least one notification and a
zero-valued first update is how a handler says “started”.
NaN is refused rather than compared. It would fail every ordering
test — including the is_finite one a reader expects to find here — and
so would wedge the cursor at whatever it last reached, silently
suppressing every later update. A value that is not a number is not
progress.