mod singleton;
pub use self::singleton::SingletonSetStorage;
mod boolean;
pub use self::boolean::BooleanSetStorage;
#[cfg(feature = "hashbrown")]
mod hashbrown;
#[cfg(feature = "hashbrown")]
pub use self::hashbrown::HashbrownSetStorage;
mod option;
pub use self::option::OptionSetStorage;
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;
}