conv::errors

Trait UnwrapOrSaturate

Source
pub trait UnwrapOrSaturate {
    type Output;

    // Required method
    fn unwrap_or_saturate(self) -> Self::Output;
}
Expand description

Unwrap a conversion by saturating.

Required Associated Types§

Source

type Output

The result of unwrapping.

Required Methods§

Source

fn unwrap_or_saturate(self) -> Self::Output

Either unwraps the successfully converted value, or saturates in the “direction” of overflow.

Implementations on Foreign Types§

Source§

impl<T, E> UnwrapOrSaturate for Result<T, E>

Implementors§