pub trait TupleBuilder: Builder {
// Required methods
fn new(factories: &<Self::Trie as Trie>::Factories) -> Self;
fn with_capacity(
factories: &<Self::Trie as Trie>::Factories,
capacity: usize,
) -> Self;
fn reserve_tuples(&mut self, additional: usize);
fn push_tuple(&mut self, tuple: <Self::Trie as Trie>::Item<'_>);
fn push_refs(&mut self, tuple: <Self::Trie as Trie>::ItemRef<'_>);
fn tuples(&self) -> usize;
// Provided method
fn extend_tuples<'a, I>(&'a mut self, tuples: I)
where I: IntoIterator<Item = <Self::Trie as Trie>::Item<'a>> { ... }
}Expand description
A type used to assemble collections from ordered sequences of tuples.
Required Methods§
Sourcefn with_capacity(
factories: &<Self::Trie as Trie>::Factories,
capacity: usize,
) -> Self
fn with_capacity( factories: &<Self::Trie as Trie>::Factories, capacity: usize, ) -> Self
Allocates a new builder with capacity for at least cap tuples.
Sourcefn reserve_tuples(&mut self, additional: usize)
fn reserve_tuples(&mut self, additional: usize)
Reserve space for additional new tuples to be added to the current
builder
Sourcefn push_tuple(&mut self, tuple: <Self::Trie as Trie>::Item<'_>)
fn push_tuple(&mut self, tuple: <Self::Trie as Trie>::Item<'_>)
Inserts a new tuple into the current builder
fn push_refs(&mut self, tuple: <Self::Trie as Trie>::ItemRef<'_>)
fn tuples(&self) -> usize
Provided Methods§
Sourcefn extend_tuples<'a, I>(&'a mut self, tuples: I)
fn extend_tuples<'a, I>(&'a mut self, tuples: I)
Inserts all of the given tuples into the current builder
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".