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§
Sourcetype Schema: PartialEqVariadic
type Schema: PartialEqVariadic
The Schema (aka Variadic type) associated with tuples in this set
Required Methods§
Sourcefn insert(&mut self, element: Self::Schema) -> bool
fn insert(&mut self, element: Self::Schema) -> bool
Insert an element into the set, return true if successful
Sourcefn iter(
&self,
) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
fn iter( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
Iterate over the elements of the set
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.