Trait Equivalent

Source
pub trait Equivalent<T>: Sized {
    // Required methods
    fn into_equivalent(self) -> T;
    fn from_equivalent(object: T) -> Self;
}

Required Methods§

Source

fn into_equivalent(self) -> T

Source

fn from_equivalent(object: T) -> Self

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.

Implementations on Foreign Types§

Source§

impl Equivalent<bool> for Option<()>

Source§

impl<K: Ord> Equivalent<BTreeMap<K, ()>> for BTreeSet<K>

Source§

fn into_equivalent(self) -> BTreeMap<K, ()>

Source§

fn from_equivalent(object: BTreeMap<K, ()>) -> Self

Source§

impl<T> Equivalent<T> for (T,)

Source§

fn into_equivalent(self) -> T

Source§

fn from_equivalent(object: T) -> Self

Source§

impl<T> Equivalent<T> for Box<T>

Source§

fn into_equivalent(self) -> T

Source§

fn from_equivalent(object: T) -> Self

Source§

impl<T: Clone> Equivalent<T> for Arc<T>

Source§

fn into_equivalent(self) -> T

Source§

fn from_equivalent(object: T) -> Self

Implementors§

Source§

impl<U: 'static + Equivalent<T>, T: 'static> Equivalent<Point<T>> for Point<U>