pub enum FormatMode {
Short,
Long,
ShortE,
LongE,
ShortG,
LongG,
Bank,
Rat,
Hex,
Plus,
Custom(usize),
}Expand description
Controls how numbers are displayed (MATLAB-compatible format modes).
Variants§
Short
5 significant digits, auto fixed/scientific (MATLAB format short).
Long
15 significant digits, auto fixed/scientific (MATLAB format long).
ShortE
Always scientific notation, 4 decimal places — 5 sig digits.
LongE
Always scientific notation, 14 decimal places — 15 sig digits.
ShortG
Same as Short for scalars (MATLAB format shortG).
LongG
Same as Long for scalars (MATLAB format longG).
Bank
Fixed 2 decimal places — currency (MATLAB format bank).
Rat
Rational approximation p/q (MATLAB format rat).
Hex
IEEE 754 hexadecimal bit pattern, 16 uppercase hex digits (MATLAB format hex).
Plus
Sign character only: +, -, or for zero (MATLAB format +).
Custom(usize)
N decimal places, auto fixed/scientific — legacy precision= setting.
Implementations§
Trait Implementations§
Source§impl Clone for FormatMode
impl Clone for FormatMode
Source§fn clone(&self) -> FormatMode
fn clone(&self) -> FormatMode
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatMode
impl Debug for FormatMode
Source§impl Default for FormatMode
impl Default for FormatMode
Source§impl PartialEq for FormatMode
impl PartialEq for FormatMode
impl StructuralPartialEq for FormatMode
Auto Trait Implementations§
impl Freeze for FormatMode
impl RefUnwindSafe for FormatMode
impl Send for FormatMode
impl Sync for FormatMode
impl Unpin for FormatMode
impl UnsafeUnpin for FormatMode
impl UnwindSafe for FormatMode
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