collections2/
collection.rs1pub trait Collection<T> {
2 fn len(&self) -> usize;
3 fn is_empty(&self) -> bool {
4 self.len() == 0
5 }
6 fn contains(&self, other: &T) -> bool
7 where
8 T: PartialEq;
9}
10
11pub trait CollectionMut<T>: Collection<T> {
12 fn clear(&mut self);
13}