pub struct QueryMatch<'q, 'tree> {
pub pattern_index: usize,
pub captures: Vec<(&'q str, Node<'tree>)>,
}Expand description
One match, with its captured nodes.
Fields§
§pattern_index: usizeWhich alternative pattern matched.
captures: Vec<(&'q str, Node<'tree>)>Captured nodes, in the order tree-sitter reported them.
Implementations§
Source§impl<'tree> QueryMatch<'_, 'tree>
impl<'tree> QueryMatch<'_, 'tree>
Trait Implementations§
Source§impl<'q, 'tree> Clone for QueryMatch<'q, 'tree>
impl<'q, 'tree> Clone for QueryMatch<'q, 'tree>
Source§fn clone(&self) -> QueryMatch<'q, 'tree>
fn clone(&self) -> QueryMatch<'q, 'tree>
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<'q, 'tree> Freeze for QueryMatch<'q, 'tree>
impl<'q, 'tree> RefUnwindSafe for QueryMatch<'q, 'tree>
impl<'q, 'tree> Send for QueryMatch<'q, 'tree>
impl<'q, 'tree> Sync for QueryMatch<'q, 'tree>
impl<'q, 'tree> Unpin for QueryMatch<'q, 'tree>
impl<'q, 'tree> UnsafeUnpin for QueryMatch<'q, 'tree>
impl<'q, 'tree> UnwindSafe for QueryMatch<'q, '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