pub struct QueryMatch {
pub byte_start: usize,
pub byte_end: usize,
pub captures: HashMap<String, CapturedNode>,
}Expand description
A match from a tree-sitter query with captured nodes.
Fields§
§byte_start: usizeThe full match byte range
byte_end: usize§captures: HashMap<String, CapturedNode>Named captures: capture_name -> (byte_start, byte_end, text)
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 From<QueryMatch> for LocatorResult
impl From<QueryMatch> for LocatorResult
Source§fn from(m: QueryMatch) -> Self
fn from(m: QueryMatch) -> Self
Converts to this type from the input type.
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