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 moreSource§impl Debug for QueryMatch
impl Debug for QueryMatch
Source§impl Default for QueryMatch
impl Default for QueryMatch
Source§fn default() -> QueryMatch
fn default() -> QueryMatch
Returns the “default value” for a type. Read more
Source§impl PartialEq for QueryMatch
impl PartialEq for QueryMatch
impl Eq for QueryMatch
impl StructuralPartialEq for QueryMatch
Auto 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