Skip to main content

awaiting

Function awaiting 

Source
pub fn awaiting(
    ui: &mut Ui,
    awaiting: Awaiting,
    progress: Progress,
    reduced: bool,
    palette: &Palette,
    style: &WidgetStyle,
) -> Response
Expand description

A wait, drawn from what is actually known about it.

The branch is Awaiting::is_determinate and one more question the description cannot answer: whether anything is watching the transfer. A bar needs both a total and a numerator, so a described amount with no Progress::delivered beside it draws the mark, not an empty trough that implies someone is counting.

What the bar may not do, from rule 1 of wiki loading-and-progress-standard and from Awaiting’s own docs: what is done over what there is, plus the time it has taken. Never a remaining time, an arrival time, or a rate extrapolated forward. A prediction is wrong the moment the transfer stalls, and being confidently wrong is worse than being honestly indeterminate.

The reading is the two raw numbers, as meter does it. The unit is the app’s — bytes for an upload, rows for an import — and a renderer that guessed at one would be formatting a quantity it was deliberately not told about.