pub struct DisplayedPrecision { /* private fields */ }Expand description
Rounds values to their cell’s displayed precision, remembering each style’s parsed format. Styles don’t change while it is used (one recalculation pass, one sweep of a workbook).
Implementations§
Source§impl DisplayedPrecision
impl DisplayedPrecision
pub fn new() -> Self
Sourcepub fn round(&mut self, wb: &Workbook, sheet: usize, c: CellRef, n: f64) -> f64
pub fn round(&mut self, wb: &Workbook, sheet: usize, c: CellRef, n: f64) -> f64
n as the format of c on sheet sheet displays it (the cell’s own style, else its
row’s, else its column’s, as the grid shows it).
Sourcepub fn round_value(
&mut self,
wb: &Workbook,
sheet: usize,
c: CellRef,
v: Value,
) -> Value
pub fn round_value( &mut self, wb: &Workbook, sheet: usize, c: CellRef, v: Value, ) -> Value
Like DisplayedPrecision::round for a value: only numbers change.
Trait Implementations§
Source§impl Default for DisplayedPrecision
impl Default for DisplayedPrecision
Source§fn default() -> DisplayedPrecision
fn default() -> DisplayedPrecision
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DisplayedPrecision
impl RefUnwindSafe for DisplayedPrecision
impl Send for DisplayedPrecision
impl Sync for DisplayedPrecision
impl Unpin for DisplayedPrecision
impl UnsafeUnpin for DisplayedPrecision
impl UnwindSafe for DisplayedPrecision
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