gclient::ext::sp_runtime::traits

Trait UniqueSaturatedInto

pub trait UniqueSaturatedInto<T>: Sized {
    // Required method
    fn unique_saturated_into(self) -> T;
}
Expand description

Just like Into except that if the source value is too big to fit into the destination type then it’ll saturate the destination.

Required Methods§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.

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§

§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,