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<SliderRange>
pub fn of(ax: &AccessSpec) -> Option<SliderRange>
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
Source§fn clone(&self) -> SliderRange
fn clone(&self) -> SliderRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.