Struct simple_slab::Slab [] [src]

pub struct Slab<T> { /* fields omitted */ }

Methods

impl<T> Slab<T>
[src]

Creates a new Slab

Creates a new, empty Slab with room for capacity elems

Panics

  • If the host system is out of memory

Inserts a new element into the slab, re-allocating if neccessary.

Panics

  • If the host system is out of memory.

Removes the element at offset.

Panics

  • If offset is out of bounds.

Returns the number of elements in the slab

Returns an iterator over the slab

Returns a mutable iterator over the slab

Trait Implementations

impl<T> Drop for Slab<T>
[src]

A method called when the value goes out of scope. Read more

impl<T> Index<usize> for Slab<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'a, T> IntoIterator for &'a Slab<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, T> IntoIterator for &'a mut Slab<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more