ShrinkFrom

Trait ShrinkFrom 

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

Perform saturating truncation.

Required Methods§

Source

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.

Implementors§

Source§

impl<Source, Dest> ShrinkFrom<Source> for Dest
where Source: Shrink<Dest>,