Trait rust_fixed_point_decimal::Round [−][src]
pub trait Round where
Self: Sized, {
fn round(self, n_frac_digits: i8) -> Self;
fn checked_round(self, n_frac_digits: i8) -> Option<Self>;
}Expand description
Types providing methods to round their values to a given number of fractional digits.
Required methods
Returns a new Self instance with its value rounded to n_frac_digits
fractional digits according to the current RoundingMode.
fn checked_round(self, n_frac_digits: i8) -> Option<Self>
fn checked_round(self, n_frac_digits: i8) -> Option<Self>
Returns a new Self instance with its value rounded to n_frac_digits
fractional digits according to the current RoundingMode, wrapped in
Option::Some, or Option::None if the result can not be
represented by Self.