pub trait Number: Clone + 'static { }Expand description
Marker trait for possible literals.
This trait is somewhat of a crutch, necessary to ensure that function wrappers can accept number arguments and distinguish them from other types (booleans, vectors, tuples, etc.).
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 Number for f32
impl Number for f64
impl Number for i8
impl Number for i16
impl Number for i32
impl Number for i64
impl Number for i128
impl Number for u8
impl Number for u16
impl Number for u32
impl Number for u64
impl Number for u128
impl Number for BigInt
Available on crate feature
num-bigint only.impl Number for BigUint
Available on crate feature
num-bigint only.impl Number for Complex32
Available on crate feature
num-complex only.impl Number for Complex64
Available on crate feature
num-complex only.