pub trait Equal<T: IsBound>: IsBound { }Expand description
Check if dynamic trait bound is the same as another dynamic trait bound.
This trait is sealed and cannot be implemented outside of the implementations here.
§Examples
use dungeon_cell::bound::{Equal, bounds};
use dungeon_cell::marker_traits::IsBound;
fn test<A: Equal<B> + IsBound, B: IsBound>() {}
test::<bounds::Empty, bounds::Empty>();
test::<bounds::Send, bounds::Send>();
test::<bounds::Normal, bounds::Normal>();ⓘ
use dungeon_cell::bound::{Equal, bounds};
use dungeon_cell::marker_traits::IsBound;
fn test<A: Equal<B> + IsBound, B: IsBound>() {}
test::<bounds::Copy, bounds::Empty>();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.