Trait From2

Source
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§

Source

fn from2(_: T) -> Self

Performs the conversion.

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.

Implementors§

Source§

impl<Scalar, Original, Target> From2<Original> for Target
where Scalar: ScalarInterface, Original: X2NominalInterface<Scalar = Scalar>, Target: X2BasicInterface<Scalar = Scalar>,