pub struct GhtInner<Head, Node>where
Head: Clone,
Node: GeneralizedHashTrieNode,{ /* private fields */ }
Expand description
internal node of a HashTrie
Trait Implementations§
source§impl<Head, Node> ColtForestNode for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + ColtForestNode,
<Node as GeneralizedHashTrieNode>::Schema: SplitBySuffix<(Head, <Node as GeneralizedHashTrieNode>::SuffixSchema)>,
impl<Head, Node> ColtForestNode for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + ColtForestNode,
<Node as GeneralizedHashTrieNode>::Schema: SplitBySuffix<(Head, <Node as GeneralizedHashTrieNode>::SuffixSchema)>,
source§impl<Head, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, ())where
GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head> + GhtGet,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
Head: Clone + Eq + Hash,
Schema: Clone + Eq + Hash + VariadicExt,
Storage: VariadicCollection<Schema = Schema>,
impl<Head, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, ())where
GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head> + GhtGet,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>,
Head: Clone + Eq + Hash,
Schema: Clone + Eq + Hash + VariadicExt,
Storage: VariadicCollection<Schema = Schema>,
source§impl<'a, Head, Rest, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest)where
Rest: ColtGet<Head = Head, Schema = Schema, Storage = Storage>,
Head: Eq + Hash + Clone,
Schema: Eq + Hash + Clone + PartialEqVariadic + 'static + VariadicExt + SplitBySuffix<ValType>,
ValType: Eq + Hash + Clone + PartialEqVariadic,
Storage: VariadicCollection<Schema = Schema>,
(&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest): ColtGet<Head = Head, Schema = Schema, Storage = Storage>,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema>,
<Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone,
GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head, Schema = Schema, Storage = Storage> + GhtGet,
impl<'a, Head, Rest, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest)where
Rest: ColtGet<Head = Head, Schema = Schema, Storage = Storage>,
Head: Eq + Hash + Clone,
Schema: Eq + Hash + Clone + PartialEqVariadic + 'static + VariadicExt + SplitBySuffix<ValType>,
ValType: Eq + Hash + Clone + PartialEqVariadic,
Storage: VariadicCollection<Schema = Schema>,
(&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest): ColtGet<Head = Head, Schema = Schema, Storage = Storage>,
GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema>,
<Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone,
GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head, Schema = Schema, Storage = Storage> + GhtGet,
source§impl<Head, Node> Default for GhtInner<Head, Node>where
Head: Clone,
Node: GeneralizedHashTrieNode,
impl<Head, Node> Default for GhtInner<Head, Node>where
Head: Clone,
Node: GeneralizedHashTrieNode,
source§impl<Head, Node> FromIterator<<Node as GeneralizedHashTrieNode>::Schema> for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + GeneralizedHashTrieNode + Clone,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
impl<Head, Node> FromIterator<<Node as GeneralizedHashTrieNode>::Schema> for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + GeneralizedHashTrieNode + Clone,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
source§impl<Head, Node> GeneralizedHashTrieNode for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + GeneralizedHashTrieNode,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
impl<Head, Node> GeneralizedHashTrieNode for GhtInner<Head, Node>where
Head: 'static + Hash + Eq + Clone,
Node: 'static + GeneralizedHashTrieNode,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
source§type Schema = <Node as GeneralizedHashTrieNode>::Schema
type Schema = <Node as GeneralizedHashTrieNode>::Schema
Schema variadic: the schema of the relation stored in this trie.
source§type KeyType = <Node as GeneralizedHashTrieNode>::KeyType
type KeyType = <Node as GeneralizedHashTrieNode>::KeyType
The prefix of columns in
Self::Schema
that the trie is keyed onsource§type ValType = <Node as GeneralizedHashTrieNode>::ValType
type ValType = <Node as GeneralizedHashTrieNode>::ValType
The suffix of columns in
Self::Schema
that are not part of the trie keyssource§type Storage = <Node as GeneralizedHashTrieNode>::Storage
type Storage = <Node as GeneralizedHashTrieNode>::Storage
The type that holds the data in the leaves
source§type SuffixSchema = (Head, <Node as GeneralizedHashTrieNode>::SuffixSchema)
type SuffixSchema = (Head, <Node as GeneralizedHashTrieNode>::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 Head = Head
type Head = 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::Schema, Self::ValType, Self::Storage>>
fn find_containing_leaf( &self, row: <Self::Schema as VariadicExt>::AsRefVar<'_>, ) -> Option<&GhtLeaf<Self::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<Head, Node> GhtGet for GhtInner<Head, Node>where
Head: 'static + Eq + Hash + Clone,
Node: 'static + GeneralizedHashTrieNode,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
impl<Head, Node> GhtGet for GhtInner<Head, Node>where
Head: 'static + Eq + Hash + Clone,
Node: 'static + GeneralizedHashTrieNode,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
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<'k, Head, Node, PrefixRest> GhtPrefixIter<(&'k Head, PrefixRest)> for GhtInner<Head, Node>
impl<'k, Head, Node, PrefixRest> GhtPrefixIter<(&'k Head, PrefixRest)> for GhtInner<Head, Node>
source§impl<Head, Node> GhtPrefixIter<()> for GhtInner<Head, Node>
impl<Head, Node> GhtPrefixIter<()> for GhtInner<Head, Node>
source§impl<Head, Node> IsTop for GhtInner<Head, Node>where
Head: Clone,
Node: GeneralizedHashTrieNode,
Node::Storage: VariadicSet<Schema = Node::Schema>,
impl<Head, Node> IsTop for GhtInner<Head, Node>where
Head: Clone,
Node: GeneralizedHashTrieNode,
Node::Storage: VariadicSet<Schema = Node::Schema>,
source§impl<Head, Node> Merge<GhtInner<Head, Node>> for GhtInner<Head, Node>where
Node: GeneralizedHashTrieNode + Merge<Node>,
Node::Storage: VariadicSet<Schema = Node::Schema>,
Self: GeneralizedHashTrieNode,
Head: Hash + Eq + Clone,
impl<Head, Node> Merge<GhtInner<Head, Node>> for GhtInner<Head, Node>where
Node: GeneralizedHashTrieNode + Merge<Node>,
Node::Storage: VariadicSet<Schema = Node::Schema>,
Self: GeneralizedHashTrieNode,
Head: Hash + Eq + Clone,
source§impl<Head, Node> PartialOrd for GhtInner<Head, Node>where
Head: Hash + Eq + 'static + Clone,
Node: 'static + GeneralizedHashTrieNode + PartialEq + PartialOrd,
Node::Storage: VariadicSet<Schema = Node::Schema>,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
impl<Head, Node> PartialOrd for GhtInner<Head, Node>where
Head: Hash + Eq + 'static + Clone,
Node: 'static + GeneralizedHashTrieNode + PartialEq + PartialOrd,
Node::Storage: VariadicSet<Schema = Node::Schema>,
Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,
impl<Head, Node> LatticeOrd for GhtInner<Head, Node>where
Self: PartialOrd<GhtInner<Head, Node>>,
Head: Clone,
Node: GeneralizedHashTrieNode,
Node::Storage: VariadicSet<Schema = Node::Schema>,
Auto Trait Implementations§
impl<Head, Node> Freeze for GhtInner<Head, Node>
impl<Head, Node> RefUnwindSafe for GhtInner<Head, Node>where
Head: RefUnwindSafe,
Node: RefUnwindSafe,
impl<Head, Node> Send for GhtInner<Head, Node>
impl<Head, Node> Sync for GhtInner<Head, Node>
impl<Head, Node> Unpin for GhtInner<Head, Node>
impl<Head, Node> UnwindSafe for GhtInner<Head, Node>where
Head: UnwindSafe,
Node: 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
)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