Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/serde_json/src/lexical/bignum.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / serde_json / src / lexical / bignum.rs` 34 lines ยท 679 bytes Raw Blame History 1 // Adapted from https://github.com/Alexhuszagh/rust-lexical. 2 3 //! Big integer type definition. 4 5 use super::math::*; 6 #[allow(unused_imports)] 7 use alloc::vec::Vec; 8 9 /// Storage for a big integer type. 10 #[derive(Clone, PartialEq, Eq)] 11 pub(crate) struct Bigint { 12 /// Internal storage for the Bigint, in little-endian order. 13 pub(crate) data: Vec, 14 } 15 16 impl Default for Bigint { 17 fn default() -> Self { 18 Bigint { 19 data: Vec::with_capacity(20), 20 } 21 } 22 } 23 24 impl Math for Bigint { 25 #[inline] 26 fn data(&self) -> &Vec { 27 &self.data 28 } 29 30 #[inline] 31 fn data_mut(&mut self) -> &mut Vec { 32 &mut self.data 33 } 34 }