Skip to main content

ArangeNum

Trait ArangeNum 

Source
pub trait ArangeNum: Element + PartialOrd {
    // Required methods
    fn from_f64(v: f64) -> Self;
    fn to_f64(self) -> f64;
}
Expand description

Trait for types usable with arange — numeric types that support stepping and comparison.

Required Methods§

Source

fn from_f64(v: f64) -> Self

Convert from f64 for step calculations.

Source

fn to_f64(self) -> f64

Convert to f64 for step calculations.

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 ArangeNum for f32

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for f64

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for i8

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for i16

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for i32

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for i64

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for u8

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for u16

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for u32

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl ArangeNum for u64

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Implementors§