pub trait RoundTo {
// Required method
const fn round_to(self, digits: i64) -> Self;
}
Expand description
✅ Rounds the number to the nearest value with the specified number of fractional digits, away from zero on tie. If rounding would cause an overflow, returns the closest representable result instead.
§Panics
This function never panics.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.