pub struct DisplayAdapter<T>where
T: ToString + EQSupported<T>,{
pub value: EngineeringQuantity<T>,
pub max_significant_figures: usize,
pub rkm: bool,
pub strict: bool,
}
Expand description
A wrapper type which allows you to specify the desired output format.
It implements Display
.
This type may be conveniently created by EngineeringQuantity::with_precision()
and EngineeringQuantity::rkm_with_precision()
.
Fields§
§value: EngineeringQuantity<T>
The value to be displayed
max_significant_figures: usize
The precision at which to display, or 0 to work it out losslessly
rkm: bool
Specifies RKM code mode
strict: bool
Always emit the precision requested, even any unnecessary untrailing zeroes after the decimal point.
Trait Implementations§
Source§impl<T> Clone for DisplayAdapter<T>
impl<T> Clone for DisplayAdapter<T>
Source§fn clone(&self) -> DisplayAdapter<T>
fn clone(&self) -> DisplayAdapter<T>
Returns a copy 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<T> Debug for DisplayAdapter<T>
impl<T> Debug for DisplayAdapter<T>
Source§impl<T: EQSupported<T>> Default for DisplayAdapter<T>
impl<T: EQSupported<T>> Default for DisplayAdapter<T>
Source§impl<T: EQSupported<T>> Display for DisplayAdapter<T>
impl<T: EQSupported<T>> Display for DisplayAdapter<T>
Source§impl<T: EQSupported<T>> PartialEq<DisplayAdapter<T>> for &str
impl<T: EQSupported<T>> PartialEq<DisplayAdapter<T>> for &str
impl<T> Copy for DisplayAdapter<T>
Auto Trait Implementations§
impl<T> Freeze for DisplayAdapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for DisplayAdapter<T>where
T: RefUnwindSafe,
impl<T> Send for DisplayAdapter<T>where
T: Send,
impl<T> Sync for DisplayAdapter<T>where
T: Sync,
impl<T> Unpin for DisplayAdapter<T>where
T: Unpin,
impl<T> UnwindSafe for DisplayAdapter<T>where
T: UnwindSafe,
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