serde_json/lexical/
bignum.rs
1use super::math::*;
6#[allow(unused_imports)]
7use alloc::vec::Vec;
8
9#[derive(Clone, PartialEq, Eq)]
11pub(crate) struct Bigint {
12 pub(crate) data: Vec<Limb>,
14}
15
16impl Default for Bigint {
17 fn default() -> Self {
18 Bigint {
19 data: Vec::with_capacity(20),
20 }
21 }
22}
23
24impl Math for Bigint {
25 #[inline]
26 fn data(&self) -> &Vec<Limb> {
27 &self.data
28 }
29
30 #[inline]
31 fn data_mut(&mut self) -> &mut Vec<Limb> {
32 &mut self.data
33 }
34}