referrerpolicy=no-referrer-when-downgrade
polkadot_sdk_frame::arithmetic::traits

Trait UniqueSaturatedFrom

pub trait UniqueSaturatedFrom<T>: Sized {
    // Required method
    fn unique_saturated_from(t: T) -> Self;
}
Expand description

Just like From 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_from(t: T) -> Self

Convert from a value of T into an equivalent instance of Self.

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> UniqueSaturatedFrom<T> for S
where S: TryFrom<T> + Bounded,