pub struct Index<'a> { /* private fields */ }Expand description
Prebuilt lookup structures over one corpus snapshot. Built once per
resolution pass and shared by resolve and dynamic_edges — the
build walks every node and is the most expensive part of a pass.
Implementations§
Source§impl<'a> Index<'a>
impl<'a> Index<'a>
Sourcepub fn build(
nodes: &'a [Node],
all_imports: &'a [Reference],
locals: &'a [LocalBinding],
fields: &'a [FieldBinding],
embeds: &'a [Embed],
roots: &[ModuleRoot],
) -> Index<'a>
pub fn build( nodes: &'a [Node], all_imports: &'a [Reference], locals: &'a [LocalBinding], fields: &'a [FieldBinding], embeds: &'a [Embed], roots: &[ModuleRoot], ) -> Index<'a>
Build the lookup index once; resolve and dynamic_edges
both borrow it, so one pass never builds it twice.
Auto Trait Implementations§
impl<'a> Freeze for Index<'a>
impl<'a> RefUnwindSafe for Index<'a>
impl<'a> Send for Index<'a>
impl<'a> Sync for Index<'a>
impl<'a> Unpin for Index<'a>
impl<'a> UnsafeUnpin for Index<'a>
impl<'a> UnwindSafe for Index<'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> 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