lexical_util::num

Trait Number

Source
pub trait Number:
    Default
    + Primitive
    + Add<Output = Self>
    + AddAssign
    + Div<Output = Self>
    + DivAssign
    + Mul<Output = Self>
    + MulAssign
    + Rem<Output = Self>
    + RemAssign
    + Sub<Output = Self>
    + SubAssign {
    const IS_SIGNED: bool;
}
Expand description

Numerical type trait.

Required Associated Constants§

Source

const IS_SIGNED: bool

If the number is a signed type.

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

Source§

const IS_SIGNED: bool = true

Source§

impl Number for f64

Source§

const IS_SIGNED: bool = true

Source§

impl Number for i8

Source§

const IS_SIGNED: bool = true

Source§

impl Number for i16

Source§

const IS_SIGNED: bool = true

Source§

impl Number for i32

Source§

const IS_SIGNED: bool = true

Source§

impl Number for i64

Source§

const IS_SIGNED: bool = true

Source§

impl Number for i128

Source§

const IS_SIGNED: bool = true

Source§

impl Number for isize

Source§

const IS_SIGNED: bool = true

Source§

impl Number for u8

Source§

const IS_SIGNED: bool = false

Source§

impl Number for u16

Source§

const IS_SIGNED: bool = false

Source§

impl Number for u32

Source§

const IS_SIGNED: bool = false

Source§

impl Number for u64

Source§

const IS_SIGNED: bool = false

Source§

impl Number for u128

Source§

const IS_SIGNED: bool = false

Source§

impl Number for usize

Source§

const IS_SIGNED: bool = false

Implementors§