pub struct SliderRange {
pub min: f64,
pub max: f64,
pub step: f64,
/* private fields */
}Expand description
A slider’s range and step, as the view declared them. The ARIA defaults stand in for an unset end: 0 and 100.
Fields§
§min: f64§max: f64§step: f64Implementations§
Source§impl SliderRange
impl SliderRange
Sourcepub fn of(ax: &AccessSpec) -> Option<Self>
pub fn of(ax: &AccessSpec) -> Option<Self>
The range a node declares, or None when it cannot be one: an end
that is not finite, or a max not past the min.
Sourcepub fn snap(&self, v: f64) -> f64
pub fn snap(&self, v: f64) -> f64
v on the step grid from min, inside the range. The top of the
range is always reachable even when the step does not divide it.
Sourcepub fn at_fraction(&self, f: f64) -> f64
pub fn at_fraction(&self, f: f64) -> f64
The value a fraction of the track means, snapped.
Trait Implementations§
Source§impl Clone for SliderRange
impl Clone for SliderRange
impl Copy for SliderRange
Source§impl Debug for SliderRange
impl Debug for SliderRange
Source§impl PartialEq for SliderRange
impl PartialEq for SliderRange
impl StructuralPartialEq for SliderRange
Auto Trait Implementations§
impl Freeze for SliderRange
impl RefUnwindSafe for SliderRange
impl Send for SliderRange
impl Sync for SliderRange
impl Unpin for SliderRange
impl UnsafeUnpin for SliderRange
impl UnwindSafe for SliderRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more