Object

Trait Object 

Source
pub trait Object:
    Clone
    + Debug
    + PartialEq
    + Eq
    + Send
    + Sync { }
Expand description

A basic trait we expect algebraic data structures to implement.

Types implementing this trait need to support:

  1. T.clone(),
  2. format!("{:?}", &T)
  3. &T == &T,
  4. &T != &T.

In other words, being clonable, and comparable for equality.

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 Object for F

Source§

impl<K: Additive> Object for Poly<K>