pub fn extend_front<I>(&mut self, iter: I)
    where
        I: IntoIterator<Item = A::Item>,
    {
        for element in iter.into_iter() {
            self.push_front(element);
        }
    }
/// Extend deque from front with the contents of an iterator.
///
/// Extracts all items from iterator and kicks out the backmost element if necessary.
///
/// # Examples
///
/// ```
/// // [9, 8, 7] -(+)-> [_, _, _, _, _, _, _] => [7, 8, 9, _, _, _, _]
/// // [6, 5, 4] -(+)-> [7, 8, 9, _, _, _, _] => [4, 5, 6, 7, 8, 9, _]
/// // [3, 2, 1] -(+)-> [4, 5, 6, 7, 8, 9, _] => [1, 2, 3, 4, 5, 6, 7]
///
/// use arraydeque::{ArrayDeque, Wrapping};
///
/// let mut buf: ArrayDeque<[_; 7], Wrapping> = ArrayDeque::new();
///
/// buf.extend_front(vec![9, 8, 7].into_iter());
/// buf.extend_front(vec![6, 5, 4].into_iter());
///
/// assert_eq!(buf.len(), 6);
///
/// // max capacity reached
/// buf.extend_front(vec![3, 2, 1].into_iter());
///
/// assert_eq!(buf.len(), 7);
/// assert_eq!(buf, vec![1, 2, 3, 4, 5, 6, 7].into());
/// ```
Extend deque from front with the contents of an iterator.
Extracts all items from iterator and kicks out the backmost element if necessary.
Extend deque from front with the contents of an iterator . Extracts all items from iterator and kicks out the backmost element if necessary .
pub fn extend_front<I>(&mut self, iter: I)
    where
        I: IntoIterator<Item = A::Item>,
    {
        for element in iter.into_iter() {
            self.push_front(element);
        }
    }
pub fn extend_front < I > ( & mut self , iter : I ) where I : IntoIterator < Item = A :: Item > , { for element in iter . into_iter ( ) { self . push_front ( element ) ; } }
Extend deque from front with the contents of an iterator.
Extend deque from front with the contents of an iterator .
&mut self
iter
I
examples


use arraydeque::{ArrayDeque, Wrapping}.

let mut buf: ArrayDeque<[_; 7], Wrapping> = ArrayDeque::new().





max capacity reached
buf.extend_front(vec![3, 2, 1].into_iter()).


use arraydeque :: { ArrayDeque Wrapping } . let mut buf : ArrayDeque< [ _ ; 7 ] Wrapping > = ArrayDeque :: new () . max capacity reached buf . extend_front ( vec! [ 3 2 1 ] . into_iter () ) .