macro_rules! deque {
{} => { ... };
{ owned: $($value:expr_2021)=>+ } => { ... };
{ $($value:expr_2021)=>+ } => { ... };
}Available on crate feature
alloc only.Expand description
Creates an allocated VecDeque from values, appending each value to the
back of the deque.
The owned: form calls to_owned() on each value.
use collections::deque;
let items = deque! { "first" => "second" };
assert_eq!(items.front(), Some(&"first"));
let owned = deque! { owned: "first" => "second" };
assert_eq!(owned.front().unwrap(), "first");