pub struct NumericContext {
pub mode: NumericMode,
pub precision: u32,
pub max_integer_bits: u32,
pub max_decimal_scale: u32,
pub rounding: RoundingMode,
}Expand description
The numeric context shared by all operations.
Fields§
§mode: NumericMode§precision: u32Significant digits used when a context rounding is required.
max_integer_bits: u32Maximum bits for exact integer/rational results.
max_decimal_scale: u32Maximum decimal scale for exact decimal results.
rounding: RoundingModeRounding mode used when the context must round.
Implementations§
Source§impl NumericContext
impl NumericContext
pub fn exact() -> Self
pub fn scientific() -> Self
Trait Implementations§
Source§impl Clone for NumericContext
impl Clone for NumericContext
Source§fn clone(&self) -> NumericContext
fn clone(&self) -> NumericContext
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 NumericContext
impl Debug for NumericContext
Source§impl Default for NumericContext
impl Default for NumericContext
Source§impl<'de> Deserialize<'de> for NumericContext
impl<'de> Deserialize<'de> for NumericContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NumericContext
Source§impl PartialEq for NumericContext
impl PartialEq for NumericContext
Source§impl Serialize for NumericContext
impl Serialize for NumericContext
impl StructuralPartialEq for NumericContext
Auto Trait Implementations§
impl Freeze for NumericContext
impl RefUnwindSafe for NumericContext
impl Send for NumericContext
impl Sync for NumericContext
impl Unpin for NumericContext
impl UnsafeUnpin for NumericContext
impl UnwindSafe for NumericContext
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