eq_trait_object

Macro eq_trait_object 

Source
macro_rules! eq_trait_object {
    ($($path:tt)+) => { ... };
}
Expand description

Implement PartialEq and Eq for a trait object that has DynEq as a supertrait.

§Examples

See the crate’s documentation for a basic example.
The macro also supports traits that have type parameters and/or where clauses.

use dyn_eq::DynEq;
use std::io::Read;

trait Difficult<R>: DynEq where R: Read {
    /* ... */
}

dyn_eq::eq_trait_object!(<R> Difficult<R> where R: Read + 'static);