Equal

Trait Equal 

Source
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.

Implementors§

Source§

impl<SendB, SyncB, CopyB, CloneB, UnpinB, DebugB, SendA, SyncA, CopyA, CloneA, UnpinA, DebugA> Equal<Bound<SendB, SyncB, CopyB, CloneB, UnpinB, DebugB>> for Bound<SendA, SyncA, CopyA, CloneA, UnpinA, DebugA>
where Bound<SendB, SyncB, CopyB, CloneB, UnpinB, DebugB>: IsBound, Bound<SendA, SyncA, CopyA, CloneA, UnpinA, DebugA>: IsBound, SendA: EqualHelper<SendB>, SyncA: EqualHelper<SyncB>, CopyA: EqualHelper<CopyB>, CloneA: EqualHelper<CloneB>, UnpinA: EqualHelper<UnpinB>, DebugA: EqualHelper<DebugB>,