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§

source

fn saturating_into(self) -> T

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, U: SaturatingFrom<T>> SaturatingInto<U> for T