pub enum PrecisionValidation {
Lossless,
AcceptableLoss {
relative_error: f64,
},
SignificantLoss {
relative_error: f64,
},
ConversionFailed,
}Expand description
Result of precision validation for Decimal to f64 conversion
Variants§
Lossless
Conversion is lossless
AcceptableLoss
Conversion loses precision but is within acceptable tolerance
Fields
SignificantLoss
Conversion loses significant precision
Fields
ConversionFailed
Conversion fails (value too large, NaN, etc.)
Trait Implementations§
Source§impl Clone for PrecisionValidation
impl Clone for PrecisionValidation
Source§fn clone(&self) -> PrecisionValidation
fn clone(&self) -> PrecisionValidation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrecisionValidation
impl Debug for PrecisionValidation
Source§impl Display for PrecisionValidation
impl Display for PrecisionValidation
Source§impl PartialEq for PrecisionValidation
impl PartialEq for PrecisionValidation
impl Copy for PrecisionValidation
impl StructuralPartialEq for PrecisionValidation
Auto Trait Implementations§
impl Freeze for PrecisionValidation
impl RefUnwindSafe for PrecisionValidation
impl Send for PrecisionValidation
impl Sync for PrecisionValidation
impl Unpin for PrecisionValidation
impl UnwindSafe for PrecisionValidation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.