pub struct QueryMatch {
pub node_id: u32,
pub span: Range<usize>,
pub content_span: Option<Range<usize>>,
pub kind: String,
}Expand description
One node returned by Document::query: its AST id, byte spans, and kind.
Fields§
§node_id: u32The node’s id in the shared AST.
span: Range<usize>The node’s whole byte range in the source.
content_span: Option<Range<usize>>The node’s interior byte range (between its delimiters), or None for
a leaf / a container with no known interior.
kind: StringThe node-kind name (e.g. "heading", "code_block").
Trait Implementations§
Source§impl Clone for QueryMatch
impl Clone for QueryMatch
Source§fn clone(&self) -> QueryMatch
fn clone(&self) -> QueryMatch
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 moreSource§impl Debug for QueryMatch
impl Debug for QueryMatch
impl Eq for QueryMatch
Source§impl PartialEq for QueryMatch
impl PartialEq for QueryMatch
impl StructuralPartialEq for QueryMatch
Auto Trait Implementations§
impl Freeze for QueryMatch
impl RefUnwindSafe for QueryMatch
impl Send for QueryMatch
impl Sync for QueryMatch
impl Unpin for QueryMatch
impl UnsafeUnpin for QueryMatch
impl UnwindSafe for QueryMatch
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