pub struct TaggedCaptures<'h, H>{
pub captures: Captures<'h, H>,
pub action: Option<Action>,
}Expand description
Fields§
§captures: Captures<'h, H>The match and any captures extracted from it.
action: Option<Action>Implementations§
Source§impl<'h, H> TaggedCaptures<'h, H>
impl<'h, H> TaggedCaptures<'h, H>
Sourcepub fn id(&self) -> Option<usize>
pub fn id(&self) -> Option<usize>
Returns the action id that was associated with the match if one was specified.
Sourcepub fn tag(&self) -> Option<char>
pub fn tag(&self) -> Option<char>
Returns the action tag that was associated with the match if one was specified.
Sourcepub fn arg(&self) -> Option<&str>
pub fn arg(&self) -> Option<&str>
Returns the argument following the action tag that was associated with the match if one was specified.
Sourcepub fn has_action(&self) -> bool
pub fn has_action(&self) -> bool
Whether or not this match has an assigned Action.
Methods from Deref<Target = Captures<'h, H>>§
Sourcepub fn get(&self, n: usize) -> Option<(usize, usize)>
pub fn get(&self, n: usize) -> Option<(usize, usize)>
The start and end byte offsets of the given submatch.
Submatch 0 is guaranteed to be Some, with get_match available as a
convenience method to directly access it. All other submatches may return None if they
were not present in the matched pattern.
Sourcepub fn match_text(&self) -> H::Slice<'_>
pub fn match_text(&self) -> H::Slice<'_>
The full text of the match in the original haystack.
Sourcepub fn submatch_text(&self, n: usize) -> Option<H::Slice<'_>>
pub fn submatch_text(&self, n: usize) -> Option<H::Slice<'_>>
The full text of the submatch, if present, in the original haystack.
Sourcepub fn iter_submatches(&self) -> impl Iterator<Item = Option<H::Slice<'_>>>
pub fn iter_submatches(&self) -> impl Iterator<Item = Option<H::Slice<'_>>>
Iterate over all submatches starting with the full match.