Trait sp_runtime::traits::SaturatedConversion [−][src]
Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
SaturatedFrom
and SaturatedInto
.
Provided methods
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
.
This just uses UniqueSaturatedFrom
internally but with this
variant you can provide the destination type using turbofish syntax
in case Rust happens not to assume the correct type.
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
.
This just uses UniqueSaturatedInto
internally but with this
variant you can provide the destination type using turbofish syntax
in case Rust happens not to assume the correct type.