pub trait ConvertFrom<T: Sized>where
Self: Sized,{
// Required method
fn convert_from(value: T) -> Option<Self>;
}Expand description
A trait for converting a value from one type to another. Any failure in converting will return None.
Required Methods§
Sourcefn convert_from(value: T) -> Option<Self>
fn convert_from(value: T) -> Option<Self>
Convert value from one type to the other, returning None if conversion failed
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.