Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/collections/fixed_deque"
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
collections |
std/collections |
fixed_deque.dodo |
option |
core/option |
fixed_deque.dodo |
Deque
Struct · Source
Ring buffer over caller-owned slots, FIFO iteration through get(0..len()).
pub struct Deque<T> {
// Private implementation fields omitted.
}
Deque.new
Function · Source
pub fn new(slots: &mut[Option<T>]) -> Deque<T> from(slots)
Deque.next
Function · Source
Cursor starts at zero. Each call yields one logical element.
pub fn next(&self, cursor: &mut usize) -> Option<&T> from(self)
Deque.len
Function · Source
pub fn len(&self) -> usize
Deque.capacity
Function · Source
pub fn capacity(&self) -> usize
Deque.is_empty
Function · Source
pub fn is_empty(&self) -> bool
Deque.get
Function · Source
pub fn get(&self, index: usize) -> Option<&T>
Deque.push_back
Function · Source
pub fn push_back(&mut self, value: T) -> void!collections.CapacityError
Deque.push_front
Function · Source
pub fn push_front(&mut self, value: T) -> void!collections.CapacityError
Deque.pop_front
Function · Source
pub fn pop_front(&mut self) -> Option<T>
Deque.pop_back
Function · Source
pub fn pop_back(&mut self) -> Option<T>
Deque.clear
Function · Source
pub fn clear(&mut self)