Trait lattices::ght::colt::ColtGet

source ·
pub trait ColtGet {
    type Schema: VariadicExt + Eq + Hash + Clone;
    type Storage: VariadicCollection;
    type SuffixSchema: VariadicExt + Eq + Hash + Clone;
    type Head: Eq + Hash;
    type Get;

    // Required methods
    fn get(self, head: &Self::Head) -> Self::Get;
    fn iter(&self) -> impl Iterator<Item = Self::Head>;
}
Expand description

Emulate the get and iter functions for a single Ght node [GhtGet`] across a forest of ColtForestNodes.

The “current” ColtGet node (corresponding to the “current” GhtGet node) at depth d from the root is a variadic list of nodes, each at depth d in its their respective trie in the forest, Tries of height d or smaller are omitted, hence the first element in any ColtGet is a GhtLeaf.

Required Associated Types§

source

type Schema: VariadicExt + Eq + Hash + Clone

Schema variadic: the schema of the relation stored in this COLT. This type is the same in all Tries and nodes of the COLT.

source

type Storage: VariadicCollection

The type of Storage This type is the same in all Tries and nodes of the COLT

source

type SuffixSchema: VariadicExt + Eq + Hash + Clone

SuffixSchema variadic: the suffix of the schema from this node of the trie downward. The first entry in this variadic is of type Head. This type is the same in all Tries of the COLT (but changes as we traverse downward)

source

type Head: Eq + Hash

The type of the first column in the SuffixSchema This type is the same in all Tries of the COLT (but changes as we traverse downward)

source

type Get

Type returned by Self::get.

Required Methods§

source

fn get(self, head: &Self::Head) -> Self::Get

Following the spec in Wang/Willsey/Suciu, on an Inner node this retrieves the value (child) associated with the given “head” key. It returns an Option containing a reference to the value if found, or None if not found. On a Leaf node, returns None.

source

fn iter(&self) -> impl Iterator<Item = Self::Head>

Iterator for the “head” keys (from inner nodes) or nothing (from leaf nodes).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, Head, Head2, Rest, Node> ColtGet for (&'a mut GhtInner<Head, GhtInner<Head2, Node>>, Rest)
where Rest: ColtGet<Head = Head>, Head: Eq + Hash + Clone, Head2: Eq + Hash + Clone, Node: GeneralizedHashTrieNode, GhtInner<Head, GhtInner<Head2, Node>>: GeneralizedHashTrieNode<Head = Rest::Head, SuffixSchema = Rest::SuffixSchema, Schema = Rest::Schema, Storage = Rest::Storage>, GhtInner<Head2, Node>: GeneralizedHashTrieNode<Schema = Rest::Schema, Storage = Rest::Storage>,

source§

type Schema = <Rest as ColtGet>::Schema

source§

type Head = <Rest as ColtGet>::Head

source§

type SuffixSchema = <Rest as ColtGet>::SuffixSchema

source§

type Get = (&'a mut GhtInner<Head2, Node>, <Rest as ColtGet>::Get)

source§

type Storage = <Rest as ColtGet>::Storage

source§

fn get(self, head: &Self::Head) -> Self::Get

source§

fn iter(&self) -> impl Iterator<Item = Self::Head>

source§

impl<'a, Head, Node> ColtGet for (&'a mut GhtInner<Head, Node>, ())

source§

type Schema = <GhtInner<Head, Node> as GeneralizedHashTrieNode>::Schema

source§

type SuffixSchema = <GhtInner<Head, Node> as GeneralizedHashTrieNode>::SuffixSchema

source§

type Head = Head

source§

type Get = (&'a mut Node, ())

source§

type Storage = <Node as GeneralizedHashTrieNode>::Storage

source§

fn get(self, head: &Self::Head) -> Self::Get

source§

fn iter(&self) -> impl Iterator<Item = Self::Head>

source§

impl<'a, Head, Rest, Schema, ValType, Storage> ColtGet for (&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest)
where Rest: ColtGet<Head = Head>, Head: Eq + Hash + Clone, Schema: Eq + Hash + Clone + PartialEqVariadic + 'static + VariadicExt + SplitBySuffix<ValType>, ValType: Eq + Hash + Clone + PartialEqVariadic, Storage: VariadicCollection<Schema = Schema>, GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode + GeneralizedHashTrieNode<Schema = Rest::Schema, Storage = Rest::Storage> + GhtGet, <Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone, GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head> + GhtGet + GeneralizedHashTrieNode<Head = Rest::Head, Schema = Rest::Schema, Storage = Rest::Storage>,

source§

type Schema = <Rest as ColtGet>::Schema

source§

type Head = <Rest as ColtGet>::Head

source§

type SuffixSchema = <Rest as ColtGet>::SuffixSchema

source§

type Get = (&'a mut GhtLeaf<Schema, ValType, Storage>, <Rest as ColtGet>::Get)

source§

type Storage = <Rest as ColtGet>::Storage

source§

fn get(self, head: &Self::Head) -> Self::Get

source§

fn iter(&self) -> impl Iterator<Item = Self::Head>

source§

impl<'a, Rest, Schema, SuffixSchema, Storage> ColtGet for (&'a mut GhtLeaf<Schema, SuffixSchema, Storage>, Rest)
where Rest: ColtGetTail<<GhtLeaf<Schema, SuffixSchema, Storage> as ColtForestNode>::Force, Storage = Storage>, <Rest as ColtGet>::SuffixSchema: 'a, GhtLeaf<Schema, SuffixSchema, Storage>: ColtForestNode, Schema: Clone + Hash + Eq + VariadicExt, SuffixSchema: Clone + Hash + Eq + VariadicExt, Storage: VariadicCollection<Schema = Schema>,

source§

type Schema = Schema

source§

type Head = <Rest as ColtGet>::Head

source§

type SuffixSchema = SuffixSchema

source§

type Get = <Rest as ColtGet>::Get

source§

type Storage = <Rest as ColtGet>::Storage

source§

fn get(self, head: &Self::Head) -> Self::Get

source§

fn iter(&self) -> impl Iterator<Item = Self::Head>

Implementors§