pub trait SpinValue:
Copy
+ PartialOrd
+ Debug
+ FromStr
+ ToString
+ Cast<f64>
+ ConvApprox<f64>
+ 'static {
// Required methods
fn default_step() -> Self;
fn add_step(self, step: Self) -> Self;
fn sub_step(self, step: Self) -> Self;
// Provided method
fn clamp(self, l_bound: Self, u_bound: Self) -> Self { ... }
}
Expand description
Requirements on type used by SpinBox
Implementations are provided for standard float and integer types.
The type must support conversion to and approximate conversion from f64
in order to enable programmatic control (e.g. tests, accessibility tools).
NOTE: this restriction might be revised in the future once Rust supports
specialization.
Required Methods§
Sourcefn default_step() -> Self
fn default_step() -> Self
The default step size (usually 1)
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.