Struct grok::Matches [−][src]
The Matches
represent matched results from a Pattern
against text.
Implementations
impl<'a> Matches<'a>
[src]
pub fn new(captures: Captures<'a>, names: &'a HashMap<String, u32>) -> Self
[src]
Instantiates the matches for a pattern after the match.
pub fn get(&self, name_or_alias: &str) -> Option<&str>
[src]
Gets the value for the name (or) alias if found, None
otherwise.
pub fn len(&self) -> usize
[src]
Returns the number of matches.
pub fn is_empty(&self) -> bool
[src]
Returns true if there are no matches, false otherwise.
pub fn iter(&'a self) -> MatchesIter<'a>ⓘNotable traits for MatchesIter<'a>
impl<'a> Iterator for MatchesIter<'a> type Item = (&'a str, &'a str);
[src]
Notable traits for MatchesIter<'a>
impl<'a> Iterator for MatchesIter<'a> type Item = (&'a str, &'a str);
Returns a tuple of key/value with all the matches found.
Note that if no match is found, the value is empty.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Matches<'a>
impl<'a> !Send for Matches<'a>
impl<'a> !Sync for Matches<'a>
impl<'a> Unpin for Matches<'a>
impl<'a> UnwindSafe for Matches<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,