Trait hyper_ast::types::HyperAST

source ·
pub trait HyperAST<'store> {
    type IdN: NodeId<IdN = Self::IdN>;
    type Idx: PrimInt;
    type Label;
    type T: Tree<TreeId = Self::IdN, Label = Self::Label, ChildIdx = Self::Idx>;
    type NS: 'store + NodeStore<Self::IdN, R<'store> = Self::T>;
    type LS: LabelStore<str, I = Self::Label>;
    type TS: TypeStore<Self::T, Ty = <Self::T as Typed>::Type>;

    // Required methods
    fn node_store(&self) -> &Self::NS;
    fn label_store(&self) -> &Self::LS;
    fn type_store(&self) -> &Self::TS;

    // Provided methods
    fn decompress<D: DecompressedSubtree<'store, Self::T, Out = D>>(
        &'store self,
        id: &Self::IdN
    ) -> (&'store Self, D)
       where Self: Sized { ... }
    fn decompress_pair<D1, D2>(
        &'store self,
        id1: &Self::IdN,
        id2: &Self::IdN
    ) -> (&'store Self, (D1, D2))
       where Self: Sized,
             D1: DecompressedSubtree<'store, Self::T, Out = D1>,
             D2: DecompressedSubtree<'store, Self::T, Out = D2> { ... }
}

Required Associated Types§

source

type IdN: NodeId<IdN = Self::IdN>

source

type Idx: PrimInt

source

type Label

source

type T: Tree<TreeId = Self::IdN, Label = Self::Label, ChildIdx = Self::Idx>

source

type NS: 'store + NodeStore<Self::IdN, R<'store> = Self::T>

source

type LS: LabelStore<str, I = Self::Label>

source

type TS: TypeStore<Self::T, Ty = <Self::T as Typed>::Type>

Required Methods§

source

fn node_store(&self) -> &Self::NS

source

fn label_store(&self) -> &Self::LS

source

fn type_store(&self) -> &Self::TS

Provided Methods§

source

fn decompress<D: DecompressedSubtree<'store, Self::T, Out = D>>( &'store self, id: &Self::IdN ) -> (&'store Self, D)where Self: Sized,

source

fn decompress_pair<D1, D2>( &'store self, id1: &Self::IdN, id2: &Self::IdN ) -> (&'store Self, (D1, D2))where Self: Sized, D1: DecompressedSubtree<'store, Self::T, Out = D1>, D2: DecompressedSubtree<'store, Self::T, Out = D2>,

Implementors§

source§

impl<'store, T, TS, NS, LS> HyperAST<'store> for SimpleHyperAST<T, TS, NS, LS>where T: Tree, T::TreeId: NodeId<IdN = T::TreeId>, T::Type: 'static, TS: TypeStore<T, Ty = T::Type>, NS: 'store + NodeStore<T::TreeId, R<'store> = T>, LS: LabelStore<str, I = T::Label>,

§

type IdN = <T as Stored>::TreeId

§

type Idx = <T as WithChildren>::ChildIdx

§

type Label = <T as Labeled>::Label

§

type T = T

§

type NS = NS

§

type LS = LS

§

type TS = TS

source§

impl<'store, TS> HyperAST<'store> for SimpleStores<TS, DefaultNodeStore>where TS: TypeStore<HashedNodeRef<'store, DefaultNodeIdentifier>, Ty = AnyType>,

§

type IdN = Entity

§

type Idx = u16

§

type Label = SymbolU32

§

type T = HashedNodeRef<'store, <SimpleStores<TS, NodeStore, LabelStore> as HyperAST<'store>>::IdN>

§

type NS = NodeStore

§

type LS = LabelStore

§

type TS = TS