pub trait TypeConversion<T, U> {
// Required method
fn convert(val: T) -> U;
}Expand description
Defines a rule to convert a type T to a type U.
Required Methods§
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.