pub struct QueryMatch {
pub pattern_index: usize,
pub captures: Vec<(Cow<'static, str>, NodeInfo)>,
}Expand description
A single match from a tree-sitter query, with captured nodes.
Fields§
§pattern_index: usizeThe pattern index that matched (position in the query string).
captures: Vec<(Cow<'static, str>, NodeInfo)>Captures: list of (capture_name, node_info) pairs.
Trait Implementations§
Source§impl Clone for QueryMatch
impl Clone for QueryMatch
Source§fn clone(&self) -> QueryMatch
fn clone(&self) -> QueryMatch
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for QueryMatch
impl RefUnwindSafe for QueryMatch
impl Send for QueryMatch
impl Sync for QueryMatch
impl Unpin for QueryMatch
impl UnsafeUnpin for QueryMatch
impl UnwindSafe for QueryMatch
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