pub struct Digits<'n> { /* private fields */ }Expand description
Digits to show (plans/03-runtime.md §2.7): a resolved number’s
rounded display digits (Number::digits), or a number’s exact value
(Number::exact_digits) — what mf2-fn-number localizes.
Implementations§
Source§impl Digits<'_>
impl Digits<'_>
Sourcepub fn integer_count(&self) -> u16
pub fn integer_count(&self) -> u16
The number of integer digits shown (≥ 1; for display digits, after
minimumIntegerDigits).
Sourcepub fn fraction_count(&self) -> u16
pub fn fraction_count(&self) -> u16
The number of fraction digits shown.
Sourcepub fn digit(&self, magnitude: i16) -> u8
pub fn digit(&self, magnitude: i16) -> u8
The digit (0–9) worth 10^magnitude: the integer digits are at
magnitudes 0 .. integer_count, the fraction digits at -1 ..= -fraction_count; 0 anywhere else.
Sourcepub fn write_neutral(&self, out: &mut dyn Sink)
pub fn write_neutral(&self, out: &mut dyn Sink)
Writes the core’s neutral output: ASCII digits, ., -/+, no
grouping.
Sourcepub fn neutral_parts(&self, out: &mut dyn SubPartSink)
pub fn neutral_parts(&self, out: &mut dyn SubPartSink)
The neutral output as sub-parts (minusSign, plusSign, integer,
decimal, fraction).
Trait Implementations§
Auto Trait Implementations§
impl<'n> Freeze for Digits<'n>
impl<'n> RefUnwindSafe for Digits<'n>
impl<'n> Send for Digits<'n>
impl<'n> Sync for Digits<'n>
impl<'n> Unpin for Digits<'n>
impl<'n> UnsafeUnpin for Digits<'n>
impl<'n> UnwindSafe for Digits<'n>
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