pub trait SetStorage<T>: Sized {
    type Iter<'this>: Iterator<Item = T>
    where
        Self: 'this
; type IntoIter: Iterator<Item = T>; fn empty() -> Self; fn len(&self) -> usize; fn is_empty(&self) -> bool; fn insert(&mut self, value: T) -> bool; fn contains(&self, value: T) -> bool; fn remove(&mut self, value: T) -> bool; fn retain<F>(&mut self, f: F)
    where
        F: FnMut(T) -> bool
; fn clear(&mut self); fn iter(&self) -> Self::Iter<'_>; fn into_iter(self) -> Self::IntoIter; }
Expand description

The trait defining how storage works for Set.

Type Arguments

  • T is the key being stored.

Required Associated Types

Immutable iterator over storage.

Owning iterator over the storage.

Required Methods

Construct empty storage.

Get the length of storage.

Check if storage is empty.

This is the storage abstraction for Set::insert.

This is the storage abstraction for Set::contains.

This is the storage abstraction for Set::remove.

This is the storage abstraction for Set::retain.

This is the storage abstraction for Set::clear.

This is the storage abstraction for Set::iter.

This is the storage abstraction for Set::into_iter.

Implementors