Skip to main content

Contains

Trait Contains 

Source
pub trait Contains<E>: Contains0 { }
Expand description

Implemented for any set that contains a member E.

§Example

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<E, T> Contains<E> for T
where T: Contains1<E> + ?Sized,