pub trait Collection {
fn len(&self) -> usize;
fn is_empty(&self) -> bool { ... }
}
impl<K, V, S> Collection for HashMap<K, V, S> where
K: Eq + Hash,
S: BuildHasher,
impl<V, S> Collection for HashSet<V, S> where
V: Eq + Hash,
S: BuildHasher,
impl<K, V> Collection for BTreeMap<K, V> where
K: Eq + Ord,
impl<V> Collection for BTreeSet<V> where
V: Eq + Ord,
impl<T> Collection for LinkedList<T>
impl<T> Collection for [T]
impl<'a> Collection for &'a str
impl Collection for String
impl<T> Collection for Vec<T>