Trait sp_runtime::traits::TryConvert
source · pub trait TryConvert<A, B> {
// Required method
fn try_convert(a: A) -> Result<B, A>;
}
Expand description
Fallible conversion trait which returns the argument in the case of being unable to convert. Generic over both source and destination types.
Required Methods§
sourcefn try_convert(a: A) -> Result<B, A>
fn try_convert(a: A) -> Result<B, A>
Attempt to make conversion. If returning Result::Err, the inner must always be a
.