pub struct QueryMatch {
pub node_id: u32,
pub span: Range<usize>,
pub content_span: Option<Range<usize>>,
pub kind: Kind,
}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: KindThe node’s kind. See Kind for why this is an enum and not the
name string the C ABI carries.
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