Trait Into2

Source
pub trait Into2<T>: Sized {
    // Required method
    fn into2(self) -> T;
}
Expand description

Local implementation of trait Into.

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 into2(self) -> T

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<Target, Original> Into2<Target> for Original
where Target: From2<Original>,