Skip to content

std::collections::deque

Status: experimental

Double-ended queue over Vec. Re-bind shape on every mutator.

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
len fn len(xs: Deque<i64>) -> i64 Element count.
peek_back fn peek_back(xs: Deque<i64>) -> i64 Back element, or 0 if empty.
peek_front fn peek_front(xs: Deque<i64>) -> i64 Front element, or 0 if empty.
pop_back fn pop_back(xs: Deque<i64>) -> Deque<i64> Drop the back.
pop_front fn pop_front(xs: Deque<i64>) -> Deque<i64> Drop the front.
push_back fn push_back(xs: Deque<i64>, value: i64) -> Deque<i64> Append to the back.
push_front fn push_front(xs: Deque<i64>, value: i64) -> Deque<i64> Prepend to the front.