Trait push_trait::Push
[−]
[src]
pub trait Push<T>: LenZero {
type PushedOut;
fn push(&mut self, val: T) -> Option<Self::PushedOut>;
}A mutable collection onto which items can be added to an arbitrary location in the collection.
Pushing an item must never decrease the length of a collection, and it usually increases it. Additionally, the push must take amortized O(n) time and space to complete with respect to the length of the pushed value.
Associated Types
type PushedOut
Type of value that gets pushed out, if any.
For some collections, a value may be "pushed out" after a value is pushed.
Required Methods
Implementors
impl<K: Hash + Eq, V> Push<(K, V)> for HashMap<K, V>impl<T: Hash + Eq> Push<T> for HashSet<T>impl<T> Push<T> for LinkedList<T>impl<T> Push<LinkedList<T>> for LinkedList<T>impl Push<char> for Stringimpl<T> Push<T> for Vec<T>impl Push<char> for Vec<u8>impl Push<char> for Vec<u16>impl Push<char> for Vec<u32>impl<T> Push<T> for VecDeque<T>impl Push<bool> for BitVecimpl<T> Push<T> for BList<T>impl<T: CLike> Push<T> for EnumSet<T>impl<K: Hash + Eq, V> Push<(K, V)> for LinkedHashMap<K, V>impl<K: Hash + Eq, V> Push<(K, V)> for LruCache<K, V>impl<V> Push<(usize, V)> for VecMap<V>