Skip to main content

DiscreteRanged

Trait DiscreteRanged 

Source
pub trait DiscreteRanged
where 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§

Required Methods§

Source

fn get_range_parameter(&self) -> Self::RangeParameter

Source

fn next_value( this: &Self::ValueType, param: &Self::RangeParameter, ) -> Self::ValueType

Get the smallest value that is larger than the this value

Source

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.

Implementors§