pub enum DataFormat {
Currency {
locale: Option<String>,
precision: Option<u8>,
},
Percent {
precision: Option<u8>,
},
Number {
precision: Option<u8>,
},
}Expand description
The display format to apply to a resolved data field value.
Variants§
Currency
Currency: "$1,234.56". Negative values render as "-$1,234.56".
locale is reserved for future locale codes (currently unused; en-US
thousands/decimal separators are always used). precision defaults to 2.
Percent
Percentage: value × 100 + "%". precision defaults to 1.
Number
Plain number with thousands separators. precision defaults to 0.
Trait Implementations§
Source§impl Clone for DataFormat
impl Clone for DataFormat
Source§fn clone(&self) -> DataFormat
fn clone(&self) -> DataFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataFormat
impl Debug for DataFormat
Source§impl PartialEq for DataFormat
impl PartialEq for DataFormat
Source§fn eq(&self, other: &DataFormat) -> bool
fn eq(&self, other: &DataFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DataFormat
Auto Trait Implementations§
impl Freeze for DataFormat
impl RefUnwindSafe for DataFormat
impl Send for DataFormat
impl Sync for DataFormat
impl Unpin for DataFormat
impl UnsafeUnpin for DataFormat
impl UnwindSafe for DataFormat
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