Numeric

Trait Numeric 

Source
pub trait Numeric: Copy + Encode {
    // Required methods
    fn to_usize(&self) -> usize;
    fn from_usize(num: usize) -> Self;
}

Required Methods§

Source

fn to_usize(&self) -> usize

Source

fn from_usize(num: usize) -> Self

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 Numeric for u16

Source§

fn to_usize(&self) -> usize

Source§

fn from_usize(num: usize) -> Self

Source§

impl Numeric for u32

Source§

fn to_usize(&self) -> usize

Source§

fn from_usize(num: usize) -> Self

Implementors§