pub trait MaybeTryFrom<T>: Sized {
type Error;
// Required method
fn maybe_try_from(item: T) -> NullableResult<Self, Self::Error>;
}
Expand description
Analogue of TryFrom that returns a NullableResult
Required Associated Types§
Required Methods§
Sourcefn maybe_try_from(item: T) -> NullableResult<Self, Self::Error>
fn maybe_try_from(item: T) -> NullableResult<Self, Self::Error>
Convert a T
to NullableResult<Self, Self::Error>
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.