Debian Codegraph @

.cargo/vendor/serde_json/src/lexical/mod.rs

raw
1 // The code in this module is derived from the `lexical` crate by @Alexhuszagh
2 // which the author condensed into this minimal subset for use in serde_json.
3 // For the serde_json use case we care more about reliably round tripping all
4 // possible floating point values than about parsing any arbitrarily long string
5 // of digits with perfect accuracy, as the latter would take a high cost in
6 // compile time and performance.
7 //
8 // Dual licensed as MIT and Apache 2.0 just like the rest of serde_json, but
9 // copyright Alexander Huszagh.
10
11 //! Fast, minimal float-parsing algorithm.
12
13 // MODULES
14 pub(crate) mod algorithm;
15 mod bhcomp;
16 mod bignum;
17 mod cached;
18 mod cached_float80;
19 mod digit;
20 mod errors;
21 pub(crate) mod exponent;
22 pub(crate) mod float;
23 mod large_powers;
24 pub(crate) mod math;
25 pub(crate) mod num;
26 pub(crate) mod parse;
27 pub(crate) mod rounding;
28 mod shift;
29 mod small_powers;
30
31 #[cfg(limb_width_32)]
32 mod large_powers32;
33
34 #[cfg(limb_width_64)]
35 mod large_powers64;
36
37 // API
38 pub use self::parse::{parse_concise_float, parse_truncated_float};