pub struct SingletonHashTrieIter { /* private fields */ }Expand description
A singleton “hash trie” containing one value.
Implements HashTrieIterator over a single-value relation. Used by
the const-view rewrite to expose a Const_c<id> = {c<id>} predicate as
if it were a real hash-trie-backed relation.
Implementations§
Source§impl SingletonHashTrieIter
impl SingletonHashTrieIter
Sourcepub fn new(value: usize, hash: u64) -> Self
pub fn new(value: usize, hash: u64) -> Self
Construct a new singleton positioned at its root (pre-open).
hash is the precomputed u64 hash of value under whichever
kermit_iters::HashStrategy the caller uses for the matching
HashTrie<H>. Keeping the strategy out of this struct lets the
singleton remain Sized without a phantom parameter and lets a
generic caller (e.g. hash_join<R, H>) drive both the trie and
the singleton with the same hash function.
Trait Implementations§
Source§impl Clone for SingletonHashTrieIter
impl Clone for SingletonHashTrieIter
Source§fn clone(&self) -> SingletonHashTrieIter
fn clone(&self) -> SingletonHashTrieIter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingletonHashTrieIter
impl Debug for SingletonHashTrieIter
Source§impl HashTrieIterable for SingletonHashTrieIter
impl HashTrieIterable for SingletonHashTrieIter
Source§fn hash_trie_iter(&self) -> impl HashTrieIterator
fn hash_trie_iter(&self) -> impl HashTrieIterator
Returns a
HashTrieIterator over this structure.Source§impl HashTrieIterator for SingletonHashTrieIter
impl HashTrieIterator for SingletonHashTrieIter
Source§fn next(&mut self) -> Option<u64>
fn next(&mut self) -> Option<u64>
Advance to the next occupied bucket. Returns its hash, or
None if
no further bucket exists at this level.Source§fn lookup(&mut self, hash: u64) -> bool
fn lookup(&mut self, hash: u64) -> bool
Position at the bucket with exact hash
hash. Returns true iff a
matching bucket exists.Source§fn size(&self) -> usize
fn size(&self) -> usize
Number of occupied buckets in the current node — the paper’s
size(I_j). Used by the algorithm to pick the smallest table at
each level (argmin size).Source§fn at_end(&self) -> bool
fn at_end(&self) -> bool
true iff the iterator is positioned past the last occupied bucket
in the current node.impl JoinIterable for SingletonHashTrieIter
Auto Trait Implementations§
impl Freeze for SingletonHashTrieIter
impl RefUnwindSafe for SingletonHashTrieIter
impl Send for SingletonHashTrieIter
impl Sync for SingletonHashTrieIter
impl Unpin for SingletonHashTrieIter
impl UnsafeUnpin for SingletonHashTrieIter
impl UnwindSafe for SingletonHashTrieIter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more