[−][src]Macro col_macros::vec_deque
Construct a double-ended queue of type Deque<T> which can be and is an alias to VecDeque
It does so by simply creating an array from the elements,set the capacity of the vec at they length,read each entry into and mem::forget the array.
Collections with a capacity,the push_back and push_front methods,are accepted LinkedList not.
Examples
use col_macros::vec_deque; use col_macros::types::Deque; let mut vec = vec_deque![1, 2, 3 => 4, 5, 6]; let mut vec2 = { let mut vec1 = Deque::new(); vec1.push_front(1); vec1.push_front(2); vec1.push_front(3); vec1.push_back(4); vec1.push_back(5); vec1.push_back(6); vec1 }; assert_eq!(vec, vec2);