Struct tree_sitter_graph::Match
source · pub struct Match<'a, 'tree> { /* private fields */ }
Implementations§
source§impl<'a, 'tree> Match<'a, 'tree>
impl<'a, 'tree> Match<'a, 'tree>
sourcepub fn full_capture(&self) -> Node<'tree>
pub fn full_capture(&self) -> Node<'tree>
Return the top-level matched node.
sourcepub fn named_captures<'s: 'a + 'tree>(
&'s self
) -> impl Iterator<Item = (&String, CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
pub fn named_captures<'s: 'a + 'tree>( &'s self ) -> impl Iterator<Item = (&String, CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
Return the matched nodes for a named capture.
sourcepub fn named_capture<'s: 'a + 'tree>(
&'s self,
name: &str
) -> Option<(CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
pub fn named_capture<'s: 'a + 'tree>( &'s self, name: &str ) -> Option<(CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
Return the matched nodes for a named capture.
sourcepub fn capture_names(&self) -> impl Iterator<Item = &String>
pub fn capture_names(&self) -> impl Iterator<Item = &String>
Return an iterator over all capture names.
sourcepub fn query_location(&self) -> &Location
pub fn query_location(&self) -> &Location
Return the query location.
Auto Trait Implementations§
impl<'a, 'tree> Freeze for Match<'a, 'tree>
impl<'a, 'tree> RefUnwindSafe for Match<'a, 'tree>
impl<'a, 'tree> !Send for Match<'a, 'tree>
impl<'a, 'tree> !Sync for Match<'a, 'tree>
impl<'a, 'tree> Unpin for Match<'a, 'tree>
impl<'a, 'tree> UnwindSafe for Match<'a, 'tree>
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