Type Alias heapless::FnvIndexSet

source ·
pub type FnvIndexSet<T, const N: usize> = IndexSet<T, BuildHasherDefault<FnvHasher>, N>;
Expand description

A heapless::IndexSet using the default FNV hasher. A list of all Methods and Traits available for FnvIndexSet can be found in the heapless::IndexSet documentation.

§Examples

use heapless::FnvIndexSet;

// A hash set with a capacity of 16 elements allocated on the stack
let mut books = FnvIndexSet::<_, 16>::new();

// Add some books.
books.insert("A Dance With Dragons").unwrap();
books.insert("To Kill a Mockingbird").unwrap();
books.insert("The Odyssey").unwrap();
books.insert("The Great Gatsby").unwrap();

// Check for a specific one.
if !books.contains("The Winds of Winter") {
    println!("We have {} books, but The Winds of Winter ain't one.",
             books.len());
}

// Remove a book.
books.remove("The Odyssey");

// Iterate over everything.
for book in &books {
    println!("{}", book);
}

Aliased Type§

struct FnvIndexSet<T, const N: usize> { /* private fields */ }