Fusuma

Components / Components

step_state

The state of step index when the current one is current (counted from 0).

The state of step index when the current one is current (counted from 0).

Signature

pub const fn step_state(index: usize, current: usize) -> StepState

Example

use fusuma::{StepState, step_state};
assert_eq!(step_state(0, 1), StepState::Done);
assert_eq!(step_state(1, 1), StepState::Current);
assert_eq!(step_state(2, 1), StepState::Todo);

All components · Source