[−][src]Trait sp_runtime::traits::CheckedConversion
Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
TryFrom
and TryInto
.
Provided methods
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
.
This just uses TryFrom
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 checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
.
This just uses TryInto
internally but with this
variant you can provide the destination type using turbofish syntax
in case Rust happens not to assume the correct type.