Macro queues::queue [] [src]

macro_rules! queue {
    () => { ... };
    ($($x:expr),+) => { ... };
}

Creates a new Queue<T>

Delegates to the default queue initializer. Note that the elements are added to the queue from left to right, therefore the first element in the list of parameters passed to the macro is considered the 'oldest' element in the queue.

Example


let q = queue![3isize, 4, 5];
assert_eq!(q.peek(), Ok(3));

let q_empty: Queue<isize> = queue![];
assert_eq!(q_empty.size(), 0);