pub struct CaptureResult {
pub name: String,
pub node: Option<NodeInfo>,
pub text: Option<String>,
pub child_fields: AHashMap<String, Option<String>>,
pub start_byte: usize,
}Expand description
A single captured node within a match.
Fields§
§name: StringThe capture name from the query (e.g., "fn_name").
node: Option<NodeInfo>The NodeInfo snapshot, present when CaptureOutput is Node or Full.
text: Option<String>The matched source text, present when CaptureOutput is Text or Full.
child_fields: AHashMap<String, Option<String>>Values of requested child fields, keyed by field name.
start_byte: usizeByte offset where this capture starts in the source.
Trait Implementations§
Source§impl Clone for CaptureResult
impl Clone for CaptureResult
Source§fn clone(&self) -> CaptureResult
fn clone(&self) -> CaptureResult
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 CaptureResult
impl Debug for CaptureResult
Source§impl Default for CaptureResult
impl Default for CaptureResult
Source§fn default() -> CaptureResult
fn default() -> CaptureResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CaptureResult
impl RefUnwindSafe for CaptureResult
impl Send for CaptureResult
impl Sync for CaptureResult
impl Unpin for CaptureResult
impl UnsafeUnpin for CaptureResult
impl UnwindSafe for CaptureResult
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