Trait truncate_integer::ShrinkFrom[][src]

pub trait ShrinkFrom<T> {
    fn shrink_from(value: T) -> Self;
}
Expand description

Perform saturating truncation.

Required methods

Perform saturating truncation.

If the value fits into the Self type, return that value. Otherwise, return the closest value that does fit.

Implementors