pub trait VariadicCollection: Extend<Self::Schema> {
    type Schema: PartialEqVariadic;

    // Required methods
    fn insert(&mut self, element: Self::Schema) -> bool;
    fn iter(
        &self,
    ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>;
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
    fn drain(&mut self) -> impl Iterator<Item = Self::Schema>;
    fn contains(
        &self,
        value: <Self::Schema as VariadicExt>::AsRefVar<'_>,
    ) -> bool;
}
Expand description

Trait for a set of Variadic Tuples

Required Associated Types§

source

type Schema: PartialEqVariadic

The Schema (aka Variadic type) associated with tuples in this set

Required Methods§

source

fn insert(&mut self, element: Self::Schema) -> bool

Insert an element into the set, return true if successful

source

fn iter( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>

Iterate over the elements of the set

source

fn len(&self) -> usize

Return number of elements in the set

source

fn is_empty(&self) -> bool

Return true if empty

source

fn drain(&mut self) -> impl Iterator<Item = Self::Schema>

iterate and drain items from the set without deallocating the container

source

fn contains(&self, value: <Self::Schema as VariadicExt>::AsRefVar<'_>) -> bool

Check for containment

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K, S> VariadicCollection for VariadicCountedHashSet<K, S>
where K: VariadicExt + PartialEqVariadic + Eq + Hash + Clone, for<'a> K::AsRefVar<'a>: Hash, S: BuildHasher,

source§

impl<Schema> VariadicCollection for VariadicColumnMultiset<Schema>
where Schema: PartialEqVariadic + Eq + Hash, for<'a> <Schema as VariadicExt>::AsRefVar<'a>: Hash,

source§

type Schema = Schema

source§

impl<T, S> VariadicCollection for VariadicHashSet<T, S>
where T: VariadicExt + PartialEqVariadic + Eq + Hash, for<'a> T::AsRefVar<'a>: Hash, S: BuildHasher,