pub struct NumberFormat {
pub unit: String,
pub conversion: f64,
pub fraction: FractionFormat,
pub precision: u32,
pub fixed_denominator: bool,
pub thousands: String,
pub radix: String,
pub prefix_spacing: String,
pub suffix_spacing: String,
pub label: LabelPosition,
}Expand description
A number format (ISO 32000-1 §12.9, Table 263): one unit of a measurement chain and how its value is shown.
Fields§
§unit: String/U: the unit label.
conversion: f64/C: the factor that converts the previous unit of the chain, user
space units for the first, into this one.
fraction: FractionFormat/F: how the fractional part is shown, decimal when absent.
precision: u32/D: the places of a decimal or the denominator of a fraction, 100
when absent.
fixed_denominator: bool/FD: whether a fraction keeps the denominator precision names
instead of being reduced.
thousands: String/RT: the text between orders of thousands, a comma when absent.
radix: String/RD: the decimal point text, a period when absent.
prefix_spacing: String/PS: the text before the label, one space when absent.
suffix_spacing: String/SS: the text after the label, one space when absent.
label: LabelPosition/O: where the label goes, after the value when absent.
Trait Implementations§
Source§impl Clone for NumberFormat
impl Clone for NumberFormat
Source§impl Debug for NumberFormat
impl Debug for NumberFormat
Source§impl PartialEq for NumberFormat
impl PartialEq for NumberFormat
impl StructuralPartialEq for NumberFormat
Auto Trait Implementations§
impl Freeze for NumberFormat
impl RefUnwindSafe for NumberFormat
impl Send for NumberFormat
impl Sync for NumberFormat
impl Unpin for NumberFormat
impl UnsafeUnpin for NumberFormat
impl UnwindSafe for NumberFormat
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