pub trait ToBigDecimal {
// Required method
fn to_big_decimal(&self) -> BigDecimal;
}Expand description
Trait for types that can be converted to BigDecimal
This trait provides a way to convert numeric types to BigDecimal for use in database operations. It’s used as a base trait for numeric operations.
Required Methods§
Sourcefn to_big_decimal(&self) -> BigDecimal
fn to_big_decimal(&self) -> BigDecimal
Convert self to a BigDecimal
For numeric types, this should be a lossless conversion. For string types, this may parse and panic if the string is not a valid number.