pub fn stepped_value(
current: i64,
step: i64,
min: Option<i64>,
max: Option<i64>,
) -> Option<i64>Expand description
Returns the value a stepper button would write, or None when the
stepper is inactive.
A stepper is inactive when the step would carry the value past min or
max; an unbounded direction never blocks a step. The returned value is
clamped into the bounds, so a step that lands exactly on a bound is
allowed while one that overshoots it is refused.
§Arguments
i64- The current value of the field.Option<i64>- The inclusive lower bound, orNonefor no bound.
§Returns
Option<i64>- The clamped value the stepper writes, orNonewhen the stepper must stay inert.