pub trait SaturatingInto<T>: Sized {
// Required method
fn saturating_into(self) -> T;
}
Expand description
Converts a value from one type to another, where if the conversion is not exact the result is set to the maximum or minimum value of the result type, whichever is closer.
It is recommended that this trait is not implemented directly; it is automatically implemented
when SaturatingFrom
is implemented.
Required Methods§
fn saturating_into(self) -> T
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.