pub struct NumberSpec { /* private fields */ }Expand description
How one numeric function resolves (plans/03-runtime.md §2.7): which
options it reads, its fraction-digit defaults, whether it rounds to an
integer, whether it selects, and the power of ten it applies. Closed
world: a handler is a spec.
Implementations§
Source§impl NumberSpec
impl NumberSpec
Sourcepub const NUMBER: NumberSpec
pub const NUMBER: NumberSpec
:number: 0–3 fraction digits, selects.
Sourcepub const INTEGER: NumberSpec
pub const INTEGER: NumberSpec
:integer: the value rounded to an integer, selects.
Sourcepub const OFFSET: NumberSpec
pub const OFFSET: NumberSpec
:offset: add / subtract, the operand’s other options kept.
Sourcepub const PERCENT: NumberSpec
pub const PERCENT: NumberSpec
:percent: the value × 100 when formatting and selecting, 0–0
fraction digits, plural selection only.
Sourcepub const UNIT: NumberSpec
pub const UNIT: NumberSpec
:unit: 0–3 fraction digits, not selectable.
Sourcepub const fn currency(fraction_digits: u8) -> NumberSpec
pub const fn currency(fraction_digits: u8) -> NumberSpec
:currency whose currency shows fraction_digits fraction digits
(fractionDigits, or the currency’s own for auto); not
selectable.
Trait Implementations§
Source§impl Clone for NumberSpec
impl Clone for NumberSpec
impl Copy for NumberSpec
Source§impl Debug for NumberSpec
impl Debug for NumberSpec
impl Eq for NumberSpec
Source§impl PartialEq for NumberSpec
impl PartialEq for NumberSpec
impl StructuralPartialEq for NumberSpec
Auto Trait Implementations§
impl Freeze for NumberSpec
impl RefUnwindSafe for NumberSpec
impl Send for NumberSpec
impl Sync for NumberSpec
impl Unpin for NumberSpec
impl UnsafeUnpin for NumberSpec
impl UnwindSafe for NumberSpec
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