pub trait WithChildren: Node + Stored {
    type ChildIdx: PrimInt;
    type Children<'a>: Children<Self::ChildIdx, <Self::TreeId as NodeId>::IdN> + ?Sized
       where Self: 'a;

    // Required methods
    fn child_count(&self) -> Self::ChildIdx;
    fn child(
        &self,
        idx: &Self::ChildIdx
    ) -> Option<<Self::TreeId as NodeId>::IdN>;
    fn child_rev(
        &self,
        idx: &Self::ChildIdx
    ) -> Option<<Self::TreeId as NodeId>::IdN>;
    fn children(&self) -> Option<&Self::Children<'_>>;
}

Required Associated Types§

source

type ChildIdx: PrimInt

source

type Children<'a>: Children<Self::ChildIdx, <Self::TreeId as NodeId>::IdN> + ?Sized where Self: 'a

Required Methods§

source

fn child_count(&self) -> Self::ChildIdx

source

fn child(&self, idx: &Self::ChildIdx) -> Option<<Self::TreeId as NodeId>::IdN>

source

fn child_rev( &self, idx: &Self::ChildIdx ) -> Option<<Self::TreeId as NodeId>::IdN>

source

fn children(&self) -> Option<&Self::Children<'_>>

Implementors§

source§

impl<'a, T> WithChildren for hyper_ast::store::nodes::fetched::HashedNodeRef<'a, T>

§

type ChildIdx = u16

§

type Children<'b> = MySlice<<<HashedNodeRef<'a, T> as Stored>::TreeId as NodeId>::IdN> where Self: 'b

source§

impl<'a, T> WithChildren for hyper_ast::store::nodes::legion::HashedNodeRef<'a, T>

§

type ChildIdx = u16

§

type Children<'b> = MySlice<<HashedNodeRef<'a, T> as Stored>::TreeId> where Self: 'b

source§

impl<H: Hash + PrimInt, U: NodeHashs<Hash = H>, N: NodeId<IdN = N> + Copy + Eq, L, T> WithChildren for HashedCompressedNode<U, N, L, T>where N::IdN: Copy + Eq,

§

type ChildIdx = u16

§

type Children<'a> = MySlice<<N as NodeId>::IdN> where Self: 'a

source§

impl<N: Eq + Clone + NodeId<IdN = N>, L, T> WithChildren for CompressedNode<N, L, T>

§

type ChildIdx = u16

§

type Children<'a> = MySlice<N> where Self: 'a