pub trait From2<T>: Sized {
// Required method
fn from2(_: T) -> Self;
}
Expand description
Local implementation of trait From.
Separate implementation is required because of restriction : “only traits defined in the current crate can be implemented for a type parameter”.
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.