pub struct QueryIndex<'a> { /* private fields */ }Expand description
Structural child and field lookups for one network state, as the
JavaScript QueryIndex: built once, so matching does not rescan every
link for every node.
A tree stored bottom-up, every child referencing its parent first, and a
tree stored top-down, a Syntax link referencing its children tokens
included, hold the same children.
Implementations§
Source§impl<'a> QueryIndex<'a>
impl<'a> QueryIndex<'a>
Sourcepub fn new(network: &'a LinkNetwork) -> Self
pub fn new(network: &'a LinkNetwork) -> Self
Indexes the structural children and fields of network.
Sourcepub fn structural_children(&self, parent: LinkId) -> &[LinkId]
pub fn structural_children(&self, parent: LinkId) -> &[LinkId]
The structural children of parent, in network order, without field
and trivia links.
Trait Implementations§
Source§impl<'a> Clone for QueryIndex<'a>
impl<'a> Clone for QueryIndex<'a>
Auto Trait Implementations§
impl<'a> Freeze for QueryIndex<'a>
impl<'a> RefUnwindSafe for QueryIndex<'a>
impl<'a> Send for QueryIndex<'a>
impl<'a> Sync for QueryIndex<'a>
impl<'a> Unpin for QueryIndex<'a>
impl<'a> UnsafeUnpin for QueryIndex<'a>
impl<'a> UnwindSafe for QueryIndex<'a>
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more