Trait mozjs::conversions::Number

source ·
pub trait Number {
    const ZERO: Self;
    const MIN: Self;
    const MAX: Self;
}
Expand description

Similar to num_traits, but we use need to be able to customize values

Required Associated Constants§

source

const ZERO: Self

Zero value of this type

source

const MIN: Self

Smallest finite number this type can represent

source

const MAX: Self

Largest finite number this type can represent

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Number for f32

source§

const ZERO: f32 = 0f32

source§

const MIN: f32 = -3.40282347E+38f32

source§

const MAX: f32 = 3.40282347E+38f32

source§

impl Number for f64

source§

const ZERO: f64 = 0f64

source§

const MIN: f64 = -1.7976931348623157E+308f64

source§

const MAX: f64 = 1.7976931348623157E+308f64

source§

impl Number for i8

source§

const ZERO: i8 = 0i8

source§

const MIN: i8 = -128i8

source§

const MAX: i8 = 127i8

source§

impl Number for i16

source§

const ZERO: i16 = 0i16

source§

const MIN: i16 = -32_768i16

source§

const MAX: i16 = 32_767i16

source§

impl Number for i32

source§

const ZERO: i32 = 0i32

source§

const MIN: i32 = -2_147_483_648i32

source§

const MAX: i32 = 2_147_483_647i32

source§

impl Number for i64

source§

const ZERO: i64 = 0i64

source§

const MIN: i64 = -9_007_199_254_740_991i64

source§

const MAX: i64 = 9_007_199_254_740_991i64

source§

impl Number for u8

source§

const ZERO: u8 = 0u8

source§

const MIN: u8 = 0u8

source§

const MAX: u8 = 255u8

source§

impl Number for u16

source§

const ZERO: u16 = 0u16

source§

const MIN: u16 = 0u16

source§

const MAX: u16 = 65_535u16

source§

impl Number for u32

source§

const ZERO: u32 = 0u32

source§

const MIN: u32 = 0u32

source§

const MAX: u32 = 4_294_967_295u32

source§

impl Number for u64

source§

const ZERO: u64 = 0u64

source§

const MIN: u64 = 0u64

source§

const MAX: u64 = 9_007_199_254_740_991u64

Implementors§