Trait SuperFrom

Source
pub trait SuperFrom<T, M = ()> {
    // Required method
    fn super_from(: T) -> Self;
}
Expand description

A enhanced version of the From trait that allows with more flexibility.

Required Methods§

Source

fn super_from(: T) -> Self

Convert from a type to another type.

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<T, O> SuperFrom<T> for O
where O: From<T>,