pub struct SimpleReferenceFinder<'a, L: Language> { /* private fields */ }Expand description
A helper to find all references of a name in a tree.
Implementations§
Source§impl<'a, L: Language> SimpleReferenceFinder<'a, L>
impl<'a, L: Language> SimpleReferenceFinder<'a, L>
Sourcepub fn find(
root: &RedNode<'a, L>,
name: &'a str,
source: &'a str,
uri: impl Into<Arc<str>>,
) -> Vec<Location>
pub fn find( root: &RedNode<'a, L>, name: &'a str, source: &'a str, uri: impl Into<Arc<str>>, ) -> Vec<Location>
Finds all references of the given name in the tree.
§Arguments
root- The root node of the syntax tree.name- The name of the symbol to find.source- The source text.uri- The URI of the source file.
Trait Implementations§
Source§impl<'a, L: Language> Visitor<'a, L> for SimpleReferenceFinder<'a, L>
impl<'a, L: Language> Visitor<'a, L> for SimpleReferenceFinder<'a, L>
Auto Trait Implementations§
impl<'a, L> Freeze for SimpleReferenceFinder<'a, L>
impl<'a, L> RefUnwindSafe for SimpleReferenceFinder<'a, L>where
L: RefUnwindSafe,
impl<'a, L> Send for SimpleReferenceFinder<'a, L>
impl<'a, L> Sync for SimpleReferenceFinder<'a, L>
impl<'a, L> Unpin for SimpleReferenceFinder<'a, L>where
L: Unpin,
impl<'a, L> UnsafeUnpin for SimpleReferenceFinder<'a, L>
impl<'a, L> UnwindSafe for SimpleReferenceFinder<'a, L>where
L: UnwindSafe,
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