pub trait QueryCapture<'query, 'tree: 'query>: Debug + Clone {
type Query: Query<Capture<'query, 'tree> = Self>;
// Required methods
fn query(&self) -> &'query Self::Query;
fn raw(&self) -> QueryCapture<'tree>;
fn node(&self) -> &UntypedNode<'tree>;
fn node_mut(&mut self) -> &mut UntypedNode<'tree>;
fn name(&self) -> &'query str;
// Provided method
fn index(&self) -> usize { ... }
}Expand description
A capture from a Query with typed nodes
Required Associated Types§
Required Methods§
Sourcefn raw(&self) -> QueryCapture<'tree>
fn raw(&self) -> QueryCapture<'tree>
Get the raw tree-sitter query captures.
Sourcefn node(&self) -> &UntypedNode<'tree>
fn node(&self) -> &UntypedNode<'tree>
Get the captured untyped node
Sourcefn node_mut(&mut self) -> &mut UntypedNode<'tree>
fn node_mut(&mut self) -> &mut UntypedNode<'tree>
Get a mutable reference to the captured untyped node
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.