plotters::coord::combinators

Trait LogScalable

Source
pub trait LogScalable: Clone {
    // Required methods
    fn as_f64(&self) -> f64;
    fn from_f64(f: f64) -> Self;
}
Expand description

The trait for the type that is able to be presented in the log scale. This trait is primarily used by LogRangeExt.

Required Methods§

Source

fn as_f64(&self) -> f64

Make the conversion from the type to the floating point number

Source

fn from_f64(f: f64) -> Self

Convert a floating point number to the scale

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.

Implementations on Foreign Types§

Source§

impl LogScalable for f32

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> f32

Source§

impl LogScalable for f64

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> f64

Source§

impl LogScalable for i8

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> i8

Source§

impl LogScalable for i16

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> i16

Source§

impl LogScalable for i32

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> i32

Source§

impl LogScalable for i64

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> i64

Source§

impl LogScalable for i128

Source§

impl LogScalable for isize

Source§

impl LogScalable for u8

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> u8

Source§

impl LogScalable for u16

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> u16

Source§

impl LogScalable for u32

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> u32

Source§

impl LogScalable for u64

Source§

fn as_f64(&self) -> f64

Source§

fn from_f64(f: f64) -> u64

Source§

impl LogScalable for usize

Implementors§