pub struct Match<'a, 'tree> { /* private fields */ }
Implementations§
Source§impl<'a, 'tree> Match<'a, 'tree>
impl<'a, 'tree> Match<'a, 'tree>
Sourcepub fn full_capture(&self) -> Node<'tree>
pub fn full_capture(&self) -> Node<'tree>
Return the top-level matched node.
Sourcepub fn named_captures<'s: 'a + 'tree>(
&'s self,
) -> impl Iterator<Item = (&'a str, CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
pub fn named_captures<'s: 'a + 'tree>( &'s self, ) -> impl Iterator<Item = (&'a str, CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
Return the matched nodes for a named capture.
Sourcepub fn named_capture<'s: 'a + 'tree>(
&'s self,
name: &str,
) -> Option<(CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
pub fn named_capture<'s: 'a + 'tree>( &'s self, name: &str, ) -> Option<(CaptureQuantifier, impl Iterator<Item = Node<'tree>> + 's)>
Return the matched nodes for a named capture.
Sourcepub fn capture_names(&self) -> impl Iterator<Item = &str>
pub fn capture_names(&self) -> impl Iterator<Item = &str>
Return an iterator over all capture names.
Sourcepub fn query_location(&self) -> &Location
pub fn query_location(&self) -> &Location
Return the query location.
Auto Trait Implementations§
impl<'a, 'tree> Freeze for Match<'a, 'tree>
impl<'a, 'tree> RefUnwindSafe for Match<'a, 'tree>
impl<'a, 'tree> !Send for Match<'a, 'tree>
impl<'a, 'tree> !Sync for Match<'a, 'tree>
impl<'a, 'tree> Unpin for Match<'a, 'tree>
impl<'a, 'tree> UnwindSafe for Match<'a, 'tree>
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