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>
Source§fn clone(&self) -> QueryIndex<'a>
fn clone(&self) -> QueryIndex<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.