pub struct QueryCapture<'a> {
pub name: String,
pub node: Node<'a>,
pub text: &'a str,
}Expand description
A single named capture from a tree-sitter query match.
Fields§
§name: StringThe capture name from the query pattern (e.g. “ident” from (identifier) @ident).
node: Node<'a>The matched syntax node.
text: &'a strSource text of the matched node.
Trait Implementations§
Source§impl<'a> Clone for QueryCapture<'a>
impl<'a> Clone for QueryCapture<'a>
Source§fn clone(&self) -> QueryCapture<'a>
fn clone(&self) -> QueryCapture<'a>
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<'a> Freeze for QueryCapture<'a>
impl<'a> RefUnwindSafe for QueryCapture<'a>
impl<'a> Send for QueryCapture<'a>
impl<'a> Sync for QueryCapture<'a>
impl<'a> Unpin for QueryCapture<'a>
impl<'a> UnsafeUnpin for QueryCapture<'a>
impl<'a> UnwindSafe for QueryCapture<'a>
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