Trait eclectic::collection::Collection
[−]
[src]
pub trait Collection { type Item; fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
A collection.
Associated Types
type Item
The type of the collection's items.
Required Methods
Provided Methods
fn is_empty(&self) -> bool
Checks if the collection contains zero items.
This is equivalent to self.len() == 0
, but may be optimized.
Implementors
impl<T> Collection for [T]
impl<T: Ord> Collection for BinaryHeap<T>
impl<K: Ord, V> Collection for BTreeMap<K, V>
impl<T: Ord> Collection for BTreeSet<T>
impl<K: Eq + Hash, V> Collection for HashMap<K, V>
impl<T: Eq + Hash> Collection for HashSet<T>
impl<T> Collection for LinkedList<T>
impl<T> Collection for Vec<T>
impl<T> Collection for VecDeque<T>