API reference Dodo 0.1.4

std/collections/ordered_set

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

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/ordered_set"

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
error alloc/error ordered_set.dodo
ordered_map std/collections/ordered_map ordered_set.dodo

Unit

Struct · Source

pub struct Unit {

}

Set

Struct · Source

pub struct Set<T, C, A> {
    // Private implementation fields omitted.
}

Set.next

Function · Source

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

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

Set.len

Function · Source

pub fn len(&self) -> usize

Set.capacity

Function · Source

pub fn capacity(&self) -> usize

Set.contains

Function · Source

pub fn contains(&self, value: &T) -> bool

Set.get

Function · Source

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

Set.insert

Function · Source

pub fn insert(&mut self, value: T) -> bool!error.AllocError stores(self, value)

Set.remove

Function · Source

pub fn remove(&mut self, value: &T) -> bool

Set.clear

Function · Source

pub fn clear(&mut self)

new

Function · Source

SAFETY: allocator must satisfy vector.new’s capability contract.

pub unsafe fn new<T, C, A>(allocator: A, ordering: C) -> Set<T, C, A> from(allocator, ordering)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

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
?