API reference Dodo 0.1.4

std/collections/fixed_vector

Public declarations, types, methods, and source contracts for std/collections/fixed_vector.

On this page

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_vector"

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_vector.dodo
option core/option fixed_vector.dodo

Vector

Struct · Source

Caller owns the slot array; this container owns its initialized payloads. Construction clears existing payloads. Unused slots always contain none.

pub struct Vector<T> {
    // Private implementation fields omitted.
}

Vector.new

Function · Source

pub fn new(slots: &mut[Option<T>]) -> Vector<T> from(slots)

Vector.next

Function · Source

Cursor starts at zero. Each call yields one logical element.

pub fn next(&self, cursor: &mut usize) -> Option<&T> from(self)

Vector.len

Function · Source

pub fn len(&self) -> usize

Vector.capacity

Function · Source

pub fn capacity(&self) -> usize

Vector.is_empty

Function · Source

pub fn is_empty(&self) -> bool

Vector.get

Function · Source

pub fn get(&self, index: usize) -> Option<&T>

Vector.get_mut

Function · Source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>

Vector.push

Function · Source

Failure destroys the supplied value and leaves the vector unchanged.

pub fn push(&mut self, value: T) -> void!collections.CapacityError

Vector.pop

Function · Source

pub fn pop(&mut self) -> Option<T>

Vector.insert

Function · Source

pub fn insert(&mut self, index: usize, value: T) -> void!collections.CapacityError

Vector.remove

Function · Source

pub fn remove(&mut self, index: usize) -> Option<T>

Vector.swap_remove

Function · Source

pub fn swap_remove(&mut self, index: usize) -> Option<T>

Vector.replace

Function · Source

pub fn replace(&mut self, index: usize, value: T) -> Option<T>

Vector.clear

Function · Source

pub fn clear(&mut self)

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?