pub trait ShrinkFrom<T> {
// Required method
fn shrink_from(value: T) -> Self;
}Expand description
Perform saturating truncation.
Required Methods§
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.