Trait truncate_integer::ShrinkFrom [−][src]
pub trait ShrinkFrom<T> {
fn shrink_from(value: T) -> Self;
}
Expand description
Perform saturating truncation.
Required methods
fn shrink_from(value: T) -> Self
fn shrink_from(value: T) -> Self
Perform saturating truncation.
If the value fits into the Self
type, return that value.
Otherwise, return the closest value that does fit.