Struct grok::Matches
[−]
[src]
pub struct Matches<'a> { /* fields omitted */ }
The Matches
represent matched results from a Pattern
against text.
Methods
impl<'a> Matches<'a>
[src]
fn new(
captures: Captures<'a>,
alias: &'a HashMap<String, String>,
names: &'a HashMap<String, u32>
) -> Self
[src]
captures: Captures<'a>,
alias: &'a HashMap<String, String>,
names: &'a HashMap<String, u32>
) -> Self
Instantiates the matches for a pattern after the match.
fn get(&self, name_or_alias: &str) -> Option<&str>
[src]
Gets the value for the name (or) alias if found, None
otherwise.
fn len(&self) -> usize
[src]
Returns the number of matches.
fn is_empty(&self) -> bool
[src]
Returns true if there are no matches, false otherwise.
fn iter(&'a self) -> MatchesIter<'a>
[src]
Returns a tuple of key/value with all the matches found.
Note that if no match is found, the value is empty.