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: u8Implementations§
Source§impl Decimal
impl Decimal
Sourceconst MAX_LEN: u8 = 20u8
const MAX_LEN: u8 = 20u8
Discovered via
i64::MIN.to_string().len().max(u64::MAX.to_string().len()).
Sourceconst MAX_I64_DIGITS: u8 = 19u8
const MAX_I64_DIGITS: u8 = 19u8
Discovered via i64::MAX.to_string().len().
Sourceconst MAX_U64_DIGITS: u8 = 20u8
const MAX_U64_DIGITS: u8 = 20u8
Discovered via u64::MAX.to_string().len().
Sourceconst fn unsigned(formatter: &DecimalFormatter, value: u64) -> Decimal
const fn unsigned(formatter: &DecimalFormatter, value: u64) -> Decimal
Using the given formatter, turn the value given into an unsigned decimal representation using ASCII bytes.
Sourceconst fn signed(formatter: &DecimalFormatter, value: i64) -> Decimal
const fn signed(formatter: &DecimalFormatter, value: i64) -> Decimal
Using the given formatter, turn the value given into a signed decimal representation using ASCII bytes.
const fn signed_cold(formatter: &DecimalFormatter, value: i64) -> Decimal
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