Contains
The Contains crate has 2 traits Container and In.
Container
The Container trait can be used to abstract over
types that can contain items: Vec<T>, &[T], HashMap<T>, Option<T>, ect.
use Container;
let vec = vec!;
let range = 0..5;
let option = Some;
let containers: & = &;
for container in containers
In
The In trait is the Inverse of the Container trait and represents a type that is in
a container. Mainly it reverse the call order by providing the is_in method.
use ;
let range = 0..5;
assert!; // using does_contain
assert!; // using in