pub trait Extract<Output> {
type LeafFn: ?Sized;
// Required method
fn extract(
node: Option<Node<'_>>,
source: &[u8],
last_idx: usize,
leaf_fn: Option<&Self::LeafFn>,
) -> Output;
}Expand description
Defines the logic used to convert a node in a Tree Sitter tree to the corresponding Rust type.
Required Associated Types§
Required Methods§
fn extract( node: Option<Node<'_>>, source: &[u8], last_idx: usize, leaf_fn: Option<&Self::LeafFn>, ) -> Output
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.