pub(crate) struct Decimal {
buf: [u8; 20],
start: u8,
end: u8,
}
Expand description
A formatted decimal number that can be converted to a sequence of bytes.
Fields§
§buf: [u8; 20]
§start: u8
§end: u8
Implementations§
Source§impl Decimal
impl Decimal
Sourceconst MAX_I64_LEN: u8 = 20u8
const MAX_I64_LEN: u8 = 20u8
Discovered via i64::MIN.to_string().len()
.
Sourceconst MAX_I64_DIGITS: u8 = 19u8
const MAX_I64_DIGITS: u8 = 19u8
Discovered via i64::MAX.to_string().len()
.
Sourcepub(crate) const fn new(formatter: &DecimalFormatter, value: i64) -> Decimal
pub(crate) const fn new(formatter: &DecimalFormatter, value: i64) -> Decimal
Using the given formatter, turn the value given into a decimal representation using ASCII bytes.
Sourceconst fn len(&self) -> u8
const fn len(&self) -> u8
Returns the total number of ASCII bytes (including the sign) that are used to represent this decimal number.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin for Decimal
impl UnwindSafe for Decimal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more