pub struct Matches<'a> { /* private fields */ }
Expand description
The Matches
represent matched results from a Pattern
against a provided text.
Implementations§
Source§impl<'a> Matches<'a>
impl<'a> Matches<'a>
Sourcepub fn get(&self, name: &str) -> Option<&str>
pub fn get(&self, name: &str) -> Option<&str>
Gets the value for the name (or) alias if found, None
otherwise.
Sourcepub fn iter(&'a self) -> impl Iterator<Item = (&'a str, &'a str)>
pub fn iter(&'a self) -> impl Iterator<Item = (&'a str, &'a str)>
Returns a tuple of key/value with all the matches found.
Sourcepub fn collect<O: FromIterator<(&'a str, &'a str)>>(&'a self) -> O
pub fn collect<O: FromIterator<(&'a str, &'a str)>>(&'a self) -> O
Collects the matches into a collection supporting FromIterator
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Matches<'a>
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§
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