Struct CapturesMatches

pub struct CapturesMatches<'r, 'h> { /* private fields */ }

An iterator over all non-overlapping leftmost matches with their capturing groups.

The iterator yields a Captures value until no more matches could be found.

The lifetime parameters are as follows:

This iterator can be created with the Regex::captures_iter method.

Implementations

impl<'r, 'h> CapturesMatches<'r, 'h>

fn regex(&self) -> &'r Regex

Returns the Regex value that created this iterator.

fn input<'s>(&'s self) -> &'s Input<'h>

Returns the current Input associated with this iterator.

The start position on the given Input may change during iteration, but all other values are guaranteed to remain invariant.

Trait Implementations

impl<'r, 'h> Debug for CapturesMatches<'r, 'h>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'r, 'h> FusedIterator for CapturesMatches<'r, 'h>

impl<'r, 'h> Iterator for CapturesMatches<'r, 'h>

type Item = Captures;
fn next(&mut self) -> Option<Captures>
fn count(self) -> usize

Auto Trait Implementations

impl<'r, 'h> Freeze for CapturesMatches<'r, 'h>

impl<'r, 'h> RefUnwindSafe for CapturesMatches<'r, 'h>

impl<'r, 'h> Send for CapturesMatches<'r, 'h>

impl<'r, 'h> Sync for CapturesMatches<'r, 'h>

impl<'r, 'h> Unpin for CapturesMatches<'r, 'h>

impl<'r, 'h> UnsafeUnpin for CapturesMatches<'r, 'h>

impl<'r, 'h> UnwindSafe for CapturesMatches<'r, 'h>

Blanket Implementations

impl<I> IntoIterator for CapturesMatches<'r, 'h> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for CapturesMatches<'r, 'h> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CapturesMatches<'r, 'h> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CapturesMatches<'r, 'h> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for CapturesMatches<'r, 'h>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for CapturesMatches<'r, 'h> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for CapturesMatches<'r, 'h> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for CapturesMatches<'r, 'h> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>