Trait cfg_traits::TryConvert
source · pub trait TryConvert<A, B> {
type Error;
// Required method
fn try_convert(a: A) -> Result<B, Self::Error>;
}
Expand description
A trait for trying to convert between two types.
Required Associated Types§
Required Methods§
sourcefn try_convert(a: A) -> Result<B, Self::Error>
fn try_convert(a: A) -> Result<B, Self::Error>
Attempt to make conversion. If returning Result::Err, the inner must
always be a
.
Object Safety§
This trait is not object safe.