pub struct ExtractionPattern {
pub query: String,
pub capture_output: CaptureOutput,
pub child_fields: Vec<String>,
pub max_results: Option<usize>,
pub byte_range: Option<(usize, usize)>,
}Expand description
Defines a single extraction pattern and its configuration.
Fields§
§query: StringThe tree-sitter query string (S-expression).
capture_output: CaptureOutputWhat to include in each capture result.
child_fields: Vec<String>Field names to extract from child nodes of each capture.
Maps a label to a tree-sitter field name used with child_by_field_name.
max_results: Option<usize>Maximum number of matches to return. None means unlimited.
byte_range: Option<(usize, usize)>Restrict matches to a byte range (start, end).
Trait Implementations§
Source§impl Clone for ExtractionPattern
impl Clone for ExtractionPattern
Source§fn clone(&self) -> ExtractionPattern
fn clone(&self) -> ExtractionPattern
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 moreAuto Trait Implementations§
impl Freeze for ExtractionPattern
impl RefUnwindSafe for ExtractionPattern
impl Send for ExtractionPattern
impl Sync for ExtractionPattern
impl Unpin for ExtractionPattern
impl UnsafeUnpin for ExtractionPattern
impl UnwindSafe for ExtractionPattern
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