use crate::arithmetic_trait::DecimalArithmetic;
use crate::rounding::RoundingMode;
pub trait DecimalConvert: DecimalArithmetic {
fn from_bits(raw: Self::Storage) -> Self;
fn to_bits(self) -> Self::Storage;
fn scale(self) -> u32;
fn from_i32(value: i32) -> Self;
fn to_int(self) -> i64;
fn to_int_with(self, mode: RoundingMode) -> i64;
#[cfg(feature = "std")]
fn from_f64(value: f64) -> Self;
#[cfg(feature = "std")]
fn from_f64_with(value: f64, mode: RoundingMode) -> Self;
#[cfg(feature = "std")]
fn to_f64(self) -> f64;
#[cfg(feature = "std")]
fn to_f32(self) -> f32;
}