pub trait DiscreteRangedwhere
Self: Ranged,{
type RangeParameter;
// Required methods
fn get_range_parameter(&self) -> Self::RangeParameter;
fn next_value(
this: &Self::ValueType,
param: &Self::RangeParameter,
) -> Self::ValueType;
fn previous_value(
this: &Self::ValueType,
param: &Self::RangeParameter,
) -> Self::ValueType;
}Expand description
The trait indicates the coordinate is discrete, so that we can draw histogram on it
Required Associated Types§
type RangeParameter
Required Methods§
fn get_range_parameter(&self) -> Self::RangeParameter
Sourcefn next_value(
this: &Self::ValueType,
param: &Self::RangeParameter,
) -> Self::ValueType
fn next_value( this: &Self::ValueType, param: &Self::RangeParameter, ) -> Self::ValueType
Get the smallest value that is larger than the this value
Sourcefn previous_value(
this: &Self::ValueType,
param: &Self::RangeParameter,
) -> Self::ValueType
fn previous_value( this: &Self::ValueType, param: &Self::RangeParameter, ) -> Self::ValueType
Get the largest value that is smaller than this value
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.