Trait conv::errors::UnwrapOrSaturate
[−]
[src]
pub trait UnwrapOrSaturate { type Output; fn unwrap_or_saturate(self) -> Self::Output; }
Unwrap a conversion by saturating.
Associated Types
type Output
The result of unwrapping.
Required Methods
fn unwrap_or_saturate(self) -> Self::Output
Either unwraps the successfully converted value, or saturates in the "direction" of overflow.
Implementors
impl<T, E> UnwrapOrSaturate for Result<T, E> where T: Saturated, E: Into<RangeErrorKind>