Number type which is represented as an IEEE 754
floating-point value.* Rust’s
This crate provides the types
UInt which wrap
u64, respectively. These
types add bounds checking to ensure the contained value is within the range representable by a
Number. They provide useful trait implementations to easily convert from Rust’s
primitive integer types.
There is a proposal for a
BigInt type type that is not far from becoming part of the
still be lots of JS code using
Number, and code in other languages that assumes its use.
js_int crate does not use Rust’s standard library, and is compatible with
serde: Serialization and deserialization support via serde. Disabled by default. You can use
#![no_std]contexts if you use
default-features = falsefor both.
lax_deserialize: Deserialize via
f64, not via
u64. If the input has a fraction, it is discarded. Please be aware that
serde_jsondoesn’t losslessly parse large floats with a fractional part by default (even if the fractional part is
.0). To fix that, enable its
TryFromIntError. Enabled by default.
An integer limited to the range of integers that can be represented exactly by an f64.
The error type returned when when parsing an integer fails.
The error type returned when a checked integral type conversion fails.
An integer limited to the range of non-negative integers that can be represented exactly by an f64.
The largest integer value that can be represented exactly by an f64.
The same as
The smallest integer value that can be represented exactly by an f64.