Skip to main content

SetEqual

Trait SetEqual 

Source
pub trait SetEqual<R: ?Sized> { }
Expand description

Indicates that two sets are equal, i.e., they contain the same members.

This is the same as T: Subset<R> + Superset<R>

§Example

assert::eq::<(i32, i16), (i16, i32)>();
assert::eq::<(i32,), (i32,)>();
// assert::eq::<(i32,), (i16,)>(); // fails to compile

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, R: AsTypeSet> SetEqual<R> for T
where T: Subset<R> + Superset<R> + AsTypeSet,