Struct differential_dataflow::trace::layers::hashed::HashedBuilder
source · pub struct HashedBuilder<K: HashOrdered, L> {
pub keys: Vec<Entry<K>>,
pub vals: L,
/* private fields */
}Expand description
Assembles a layer of this
Fields
keys: Vec<Entry<K>>Entries in the hash map.
vals: LA builder for the layer below.
Trait Implementations
sourceimpl<K: HashOrdered + Clone + Default, L: Builder> Builder for HashedBuilder<K, L>
impl<K: HashOrdered + Clone + Default, L: Builder> Builder for HashedBuilder<K, L>
sourcefn boundary(&mut self) -> usize
fn boundary(&mut self) -> usize
Looks at the contents of self.temp and extends self.keys appropriately.
This is where the “hash map” structure is produced. Up until this point, all (key, usize) pairs were committed to self.temp, where they awaited layout. That now happens here.
type Trie = HashedLayer<K, <L as Builder>::Trie>
type Trie = HashedLayer<K, <L as Builder>::Trie>
The type of collection produced.
sourceimpl<K: HashOrdered + Clone + Default, L: MergeBuilder> MergeBuilder for HashedBuilder<K, L>
impl<K: HashOrdered + Clone + Default, L: MergeBuilder> MergeBuilder for HashedBuilder<K, L>
sourcefn copy_range(&mut self, other: &Self::Trie, lower: usize, upper: usize)
fn copy_range(&mut self, other: &Self::Trie, lower: usize, upper: usize)
Copies fully formed ranges (note plural) of keys from another trie.
While the ranges are fully formed, the offsets in them are relative to the other trie, and must be corrected. These keys must be moved immediately to self.keys, as there is no info about boundaries between them, and we are unable to lay out the info any differently.
sourcefn with_capacity(other1: &Self::Trie, other2: &Self::Trie) -> Self
fn with_capacity(other1: &Self::Trie, other2: &Self::Trie) -> Self
Allocates an instance of the builder with sufficient capacity to contain the merged data.
sourceimpl<K: HashOrdered + Clone + Default, L: TupleBuilder> TupleBuilder for HashedBuilder<K, L>
impl<K: HashOrdered + Clone + Default, L: TupleBuilder> TupleBuilder for HashedBuilder<K, L>
type Item = (K, <L as TupleBuilder>::Item)
type Item = (K, <L as TupleBuilder>::Item)
The type of item accepted for construction.
sourcefn with_capacity(cap: usize) -> Self
fn with_capacity(cap: usize) -> Self
Allocates a new builder with capacity for at least
cap tuples.sourcefn push_tuple(&mut self, (key, val): (K, L::Item))
fn push_tuple(&mut self, (key, val): (K, L::Item))
Inserts a new into the collection.
Auto Trait Implementations
impl<K, L> RefUnwindSafe for HashedBuilder<K, L>where
K: RefUnwindSafe,
L: RefUnwindSafe,
impl<K, L> Send for HashedBuilder<K, L>where
K: Send,
L: Send,
impl<K, L> Sync for HashedBuilder<K, L>where
K: Sync,
L: Sync,
impl<K, L> Unpin for HashedBuilder<K, L>where
K: Unpin,
L: Unpin,
impl<K, L> UnwindSafe for HashedBuilder<K, L>where
K: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more