pub enum Cadence {
Activity,
}Expand description
Variants§
Activity
How long the activity mark holds each of its two states.
The hard-disk light: a small mark saying that something is happening,
on a wait with no countable size. makeover-layout’s Awaiting is what
says the wait has no size; this is how fast the answer to that blinks.
A half-period, not a cycle. The mark is lit for this long, dark for this long, and a full cycle is twice it. One number rather than a period plus a duty cycle, because two numbers are two things three renderers can disagree about, and a mark that is lit a fifth of the time in a browser and half the time in a terminal is not one mark.
500ms, so a cycle is a second. Not a count off the tree like every other rung, since nothing has drawn this yet. What it is answerable to is the eye: fast enough that a glance catches it working, slow enough that it reads as steady work rather than as an alarm. A blink much under half a second is a strobe and starts to claim urgency the wait has not earned.
This is the fallback, and on most surfaces it should be the rarer
case. Where the activity is observable the mark follows it, per rule 3
of wiki loading-and-progress-standard: an upload blinks per chunk
delivered, and this is for the waits with nothing to watch.
Implementations§
Source§impl Cadence
impl Cadence
Sourcepub const fn cycle(self) -> Duration
pub const fn cycle(self) -> Duration
One full on-and-off cycle, which is twice the half-period.
Spelled here rather than doubled at each call site: a renderer driving a
two-state toggle wants duration, and one scheduling
a whole cycle wants this, and neither should be doing the arithmetic.