pub trait UnwrapOrSaturate {
type Output;
// Required method
fn unwrap_or_saturate(self) -> Self::Output;
}
Expand description
Unwrap a conversion by saturating.
Required Associated Types§
Required Methods§
Sourcefn unwrap_or_saturate(self) -> Self::Output
fn unwrap_or_saturate(self) -> Self::Output
Either unwraps the successfully converted value, or saturates in the “direction” of overflow.