ReversibleRanged

Trait ReversibleRanged 

Source
pub trait ReversibleRanged: Ranged {
    // Required method
    fn unmap(&self, input: i32, limit: (i32, i32)) -> Option<Self::ValueType>;
}
Expand description

The trait indicates the ranged value can be map reversely, which means an pixel-based coordinate is given, it’s possible to figure out the underlying logic value.

Required Methods§

Source

fn unmap(&self, input: i32, limit: (i32, i32)) -> Option<Self::ValueType>

Perform the reverse mapping

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§

Source§

impl ReversibleRanged for RangedCoordf32

Source§

impl ReversibleRanged for RangedCoordf64

Source§

impl<DC: DiscreteRanged> ReversibleRanged for DC

Source§

impl<DT> ReversibleRanged for RangedDateTime<DT>
where DT: Datelike + Timelike + TimeValue + Clone + PartialOrd + Add<Duration, Output = DT> + Sub<DT, Output = Duration>, RangedDate<DT::DateType>: Ranged<ValueType = DT::DateType>,

Available on crate feature chrono only.