pub struct Matches<'a> { /* private fields */ }
Expand description
The Matches
represent matched results from a Pattern
against a provided text.
Implementations
sourceimpl<'a> Matches<'a>
impl<'a> Matches<'a>
sourcepub fn get(&self, name_or_alias: &str) -> Option<&str>
pub fn get(&self, name_or_alias: &str) -> Option<&str>
Gets the value for the name (or) alias if found, None
otherwise.
sourcepub fn iter(&'a self) -> MatchesIter<'a>ⓘNotable traits for MatchesIter<'a>impl<'a> Iterator for MatchesIter<'a> type Item = (&'a str, &'a str);
pub fn iter(&'a self) -> MatchesIter<'a>ⓘ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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more