Trait LogScalable

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§

fn as_f64(&self) -> f64

Make the conversion from the type to the floating point number

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§

§

impl LogScalable for f32

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> f32

§

impl LogScalable for f64

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> f64

§

impl LogScalable for i8

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> i8

§

impl LogScalable for i16

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> i16

§

impl LogScalable for i32

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> i32

§

impl LogScalable for i64

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> i64

§

impl LogScalable for i128

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> i128

§

impl LogScalable for isize

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> isize

§

impl LogScalable for u8

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> u8

§

impl LogScalable for u16

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> u16

§

impl LogScalable for u32

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> u32

§

impl LogScalable for u64

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> u64

§

impl LogScalable for usize

§

fn as_f64(&self) -> f64

§

fn from_f64(f: f64) -> usize

Implementors§