pub struct GhtLeaf<Schema, ValType, Storage>{ /* private fields */ }
Expand description
leaf node of a HashTrie
Trait Implementations§
source§impl<Schema, Head, Rest, Storage> ColtForestNode for GhtLeaf<Schema, (Head, Rest), Storage>where
Head: 'static + Clone + Hash + Eq,
Rest: 'static + Clone + Hash + Eq + VariadicExt + PartialEqVariadic,
Schema: 'static + Hash + Eq + Clone + VariadicExt + PartialEqVariadic + SplitBySuffix<(Head, Rest)> + SplitBySuffix<Rest>,
<Schema as SplitBySuffix<(Head, Rest)>>::Prefix: Eq + Hash + Clone,
<Schema as SplitBySuffix<Rest>>::Prefix: Eq + Hash + Clone,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
GhtLeaf<Schema, Rest, Storage>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
GhtInner<Head, GhtLeaf<Schema, Rest, Storage>>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
impl<Schema, Head, Rest, Storage> ColtForestNode for GhtLeaf<Schema, (Head, Rest), Storage>where
Head: 'static + Clone + Hash + Eq,
Rest: 'static + Clone + Hash + Eq + VariadicExt + PartialEqVariadic,
Schema: 'static + Hash + Eq + Clone + VariadicExt + PartialEqVariadic + SplitBySuffix<(Head, Rest)> + SplitBySuffix<Rest>,
<Schema as SplitBySuffix<(Head, Rest)>>::Prefix: Eq + Hash + Clone,
<Schema as SplitBySuffix<Rest>>::Prefix: Eq + Hash + Clone,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
GhtLeaf<Schema, Rest, Storage>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
GhtInner<Head, GhtLeaf<Schema, Rest, Storage>>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
source§impl<Schema, ValType, Storage> FromIterator<Schema> for GhtLeaf<Schema, ValType, Storage>where
Schema: Eq + Hash,
Storage: VariadicCollection<Schema = Schema> + Default + FromIterator<Schema>,
impl<Schema, ValType, Storage> FromIterator<Schema> for GhtLeaf<Schema, ValType, Storage>where
Schema: Eq + Hash,
Storage: VariadicCollection<Schema = Schema> + Default + FromIterator<Schema>,
source§fn from_iter<Iter: IntoIterator<Item = Schema>>(iter: Iter) -> Self
fn from_iter<Iter: IntoIterator<Item = Schema>>(iter: Iter) -> Self
Creates a value from an iterator. Read more
source§impl<Schema, Storage> GeneralizedHashTrieNode for GhtLeaf<Schema, (), Storage>where
Schema: 'static + Eq + VariadicExt + Hash + Clone + PartialEqVariadic,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
impl<Schema, Storage> GeneralizedHashTrieNode for GhtLeaf<Schema, (), Storage>where
Schema: 'static + Eq + VariadicExt + Hash + Clone + PartialEqVariadic,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
source§type SuffixSchema = ()
type SuffixSchema = ()
SuffixSchema variadic: the suffix of
Self::Schema
from this node of the trie
downward. The first entry in this variadic is of type Self::Head
.source§type ValType = ()
type ValType = ()
The suffix of columns in
Self::Schema
that are not part of the trie keyssource§type KeyType = Schema
type KeyType = Schema
The prefix of columns in
Self::Schema
that the trie is keyed onsource§type Head = ()
type Head = ()
The first field in
Self::SuffixSchema
, and the key for the next node in the trie.source§fn new_from(input: impl IntoIterator<Item = Self::Schema>) -> Self
fn new_from(input: impl IntoIterator<Item = Self::Schema>) -> Self
Create a new Ght from the iterator.
source§fn merge_node(&mut self, other: Self) -> bool
fn merge_node(&mut self, other: Self) -> bool
Merge a matching Ght node into this node
source§fn contains<'a>(
&'a self,
row: <Self::Schema as VariadicExt>::AsRefVar<'a>,
) -> bool
fn contains<'a>( &'a self, row: <Self::Schema as VariadicExt>::AsRefVar<'a>, ) -> bool
Returns
true
if the (entire) row is found below in the trie, false
otherwise.
See GhtGet::get
to look just for “head” keys in this nodesource§fn recursive_iter(
&self,
) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
fn recursive_iter( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
Iterate through (entire) rows stored in this HashTrie.
source§fn find_containing_leaf(
&self,
row: <Self::Schema as VariadicExt>::AsRefVar<'_>,
) -> Option<&GhtLeaf<<Self as GeneralizedHashTrieNode>::Schema, Self::ValType, Self::Storage>>
fn find_containing_leaf( &self, row: <Self::Schema as VariadicExt>::AsRefVar<'_>, ) -> Option<&GhtLeaf<<Self as GeneralizedHashTrieNode>::Schema, Self::ValType, Self::Storage>>
return the leaf below that contains this row, or
None
if not found.source§fn into_iter(self) -> Option<impl Iterator<Item = Self::Schema>>
fn into_iter(self) -> Option<impl Iterator<Item = Self::Schema>>
into_iter for leaf elements, or None for inner nodes
source§impl<Schema, ValHead, ValRest, Storage> GeneralizedHashTrieNode for GhtLeaf<Schema, (ValHead, ValRest), Storage>where
Schema: 'static + Eq + VariadicExt + Hash + Clone + SplitBySuffix<(ValHead, ValRest)> + PartialEqVariadic,
ValHead: Clone + Eq + Hash,
(ValHead, ValRest): Clone + Eq + Hash + PartialEqVariadic,
<Schema as SplitBySuffix<(ValHead, ValRest)>>::Prefix: Eq + Hash + Clone,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
impl<Schema, ValHead, ValRest, Storage> GeneralizedHashTrieNode for GhtLeaf<Schema, (ValHead, ValRest), Storage>where
Schema: 'static + Eq + VariadicExt + Hash + Clone + SplitBySuffix<(ValHead, ValRest)> + PartialEqVariadic,
ValHead: Clone + Eq + Hash,
(ValHead, ValRest): Clone + Eq + Hash + PartialEqVariadic,
<Schema as SplitBySuffix<(ValHead, ValRest)>>::Prefix: Eq + Hash + Clone,
Storage: VariadicCollection<Schema = Schema> + Default + IntoIterator<Item = Schema>,
source§type SuffixSchema = (ValHead, ValRest)
type SuffixSchema = (ValHead, ValRest)
SuffixSchema variadic: the suffix of
Self::Schema
from this node of the trie
downward. The first entry in this variadic is of type Self::Head
.source§type ValType = (ValHead, ValRest)
type ValType = (ValHead, ValRest)
The suffix of columns in
Self::Schema
that are not part of the trie keyssource§type KeyType = <Schema as SplitBySuffix<(ValHead, ValRest)>>::Prefix
type KeyType = <Schema as SplitBySuffix<(ValHead, ValRest)>>::Prefix
The prefix of columns in
Self::Schema
that the trie is keyed onsource§type Head = ValHead
type Head = ValHead
The first field in
Self::SuffixSchema
, and the key for the next node in the trie.source§fn new_from(input: impl IntoIterator<Item = Self::Schema>) -> Self
fn new_from(input: impl IntoIterator<Item = Self::Schema>) -> Self
Create a new Ght from the iterator.
source§fn merge_node(&mut self, other: Self) -> bool
fn merge_node(&mut self, other: Self) -> bool
Merge a matching Ght node into this node
source§fn contains<'a>(
&'a self,
row: <Self::Schema as VariadicExt>::AsRefVar<'a>,
) -> bool
fn contains<'a>( &'a self, row: <Self::Schema as VariadicExt>::AsRefVar<'a>, ) -> bool
Returns
true
if the (entire) row is found below in the trie, false
otherwise.
See GhtGet::get
to look just for “head” keys in this nodesource§fn recursive_iter(
&self,
) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
fn recursive_iter( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
Iterate through (entire) rows stored in this HashTrie.
source§fn find_containing_leaf(
&self,
row: <Self::Schema as VariadicExt>::AsRefVar<'_>,
) -> Option<&GhtLeaf<<Self as GeneralizedHashTrieNode>::Schema, Self::ValType, Self::Storage>>
fn find_containing_leaf( &self, row: <Self::Schema as VariadicExt>::AsRefVar<'_>, ) -> Option<&GhtLeaf<<Self as GeneralizedHashTrieNode>::Schema, Self::ValType, Self::Storage>>
return the leaf below that contains this row, or
None
if not found.source§fn into_iter(self) -> Option<impl Iterator<Item = Self::Schema>>
fn into_iter(self) -> Option<impl Iterator<Item = Self::Schema>>
into_iter for leaf elements, or None for inner nodes
source§impl<Schema, ValType, Storage> GhtGet for GhtLeaf<Schema, ValType, Storage>where
Schema: 'static + Eq + Hash + Clone + PartialEqVariadic + SplitBySuffix<ValType>,
ValType: Eq + Hash + Clone + PartialEqVariadic,
<Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema>,
Storage: VariadicCollection<Schema = Schema>,
impl<Schema, ValType, Storage> GhtGet for GhtLeaf<Schema, ValType, Storage>where
Schema: 'static + Eq + Hash + Clone + PartialEqVariadic + SplitBySuffix<ValType>,
ValType: Eq + Hash + Clone + PartialEqVariadic,
<Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema>,
Storage: VariadicCollection<Schema = Schema>,
source§fn get<'a>(&'a self, _head: &Self::Head) -> Option<&'a Self::Get>
fn get<'a>(&'a self, _head: &Self::Head) -> Option<&'a Self::Get>
On an Inner node, retrieves the value (child) associated with the given “head” key.
returns an Option
containing a reference to the value if found, or None
if not found.
On a Leaf node, returns None.
source§fn get_mut<'a>(&'a mut self, _head: &Self::Head) -> Option<&'a mut Self::Get>
fn get_mut<'a>(&'a mut self, _head: &Self::Head) -> Option<&'a mut Self::Get>
get, but mutable output
source§fn iter(&self) -> impl Iterator<Item = Self::Head>
fn iter(&self) -> impl Iterator<Item = Self::Head>
Iterator for the “head” keys (from inner nodes) or nothing (from leaf nodes).
source§fn iter_tuples(
&self,
) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
fn iter_tuples( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>
Iterator for the tuples (from leaf nodes) or nothing (from inner nodes).
source§impl<KeyPrefixRef, Schema, ValType, Storage> GhtPrefixIter<KeyPrefixRef> for GhtLeaf<Schema, ValType, Storage>
impl<KeyPrefixRef, Schema, ValType, Storage> GhtPrefixIter<KeyPrefixRef> for GhtLeaf<Schema, ValType, Storage>
source§impl<Schema, ValType, Storage> Merge<GhtLeaf<Schema, ValType, Storage>> for GhtLeaf<Schema, ValType, Storage>where
Schema: Eq + Hash,
Storage: VariadicSet<Schema = Schema> + Extend<Schema> + IntoIterator<Item = Schema>,
impl<Schema, ValType, Storage> Merge<GhtLeaf<Schema, ValType, Storage>> for GhtLeaf<Schema, ValType, Storage>where
Schema: Eq + Hash,
Storage: VariadicSet<Schema = Schema> + Extend<Schema> + IntoIterator<Item = Schema>,
source§impl<Schema, ValType: PartialEq, Storage> PartialEq for GhtLeaf<Schema, ValType, Storage>
impl<Schema, ValType: PartialEq, Storage> PartialEq for GhtLeaf<Schema, ValType, Storage>
source§impl<Schema, SuffixSchema, Storage> PartialOrd for GhtLeaf<Schema, SuffixSchema, Storage>
impl<Schema, SuffixSchema, Storage> PartialOrd for GhtLeaf<Schema, SuffixSchema, Storage>
impl<Schema, ValType: Eq, Storage> Eq for GhtLeaf<Schema, ValType, Storage>
impl<Schema, SuffixSchema, Storage> LatticeOrd for GhtLeaf<Schema, SuffixSchema, Storage>
impl<Schema, ValType, Storage> StructuralPartialEq for GhtLeaf<Schema, ValType, Storage>
Auto Trait Implementations§
impl<Schema, ValType, Storage> Freeze for GhtLeaf<Schema, ValType, Storage>where
Storage: Freeze,
impl<Schema, ValType, Storage> RefUnwindSafe for GhtLeaf<Schema, ValType, Storage>where
Storage: RefUnwindSafe,
ValType: RefUnwindSafe,
impl<Schema, ValType, Storage> Send for GhtLeaf<Schema, ValType, Storage>
impl<Schema, ValType, Storage> Sync for GhtLeaf<Schema, ValType, Storage>
impl<Schema, ValType, Storage> Unpin for GhtLeaf<Schema, ValType, Storage>
impl<Schema, ValType, Storage> UnwindSafe for GhtLeaf<Schema, ValType, Storage>where
Storage: UnwindSafe,
ValType: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<This, Other> NaiveLatticeOrd<Other> for This
impl<This, Other> NaiveLatticeOrd<Other> for This
source§fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>
fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>
Naive compare based on the
Merge::merge
method. This method can be very inefficient;
use PartialOrd::partial_cmp
instead. Read more