use super::{
boxed::{AscBox, AscRef},
buf::AscTypedArray,
};
pub type AscBigInt = AscTypedArray<u8>;
#[derive(Clone)]
#[repr(C)]
pub struct AscBigDecimal {
digits: AscBox<AscBigInt>,
exp: AscBox<AscBigInt>,
}
impl AscBigDecimal {
pub fn new(digits: AscBox<AscBigInt>, exp: AscBox<AscBigInt>) -> AscBox<Self> {
AscBox::new(Self { digits, exp })
}
pub fn digits(&self) -> &AscRef<AscBigInt> {
self.digits.as_asc_ref()
}
}