Struct CaptureNames

pub struct CaptureNames<'r>(/* private field */);

An iterator over the names of all capture groups in a regex.

This iterator yields values of type Option<&str> in order of the opening capture group parenthesis in the regex pattern. None is yielded for groups with no name. The first element always corresponds to the implicit and unnamed group for the overall match.

'r is the lifetime of the compiled regular expression.

This iterator is created by Regex::capture_names.

Trait Implementations

impl<'r> Clone for CaptureNames<'r>

fn clone(&self) -> Self

impl<'r> Debug for CaptureNames<'r>

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

impl<'r> ExactSizeIterator for CaptureNames<'r>

impl<'r> FusedIterator for CaptureNames<'r>

impl<'r> Iterator for CaptureNames<'r>

type Item = Option<&'r str>;
fn next(&mut self) -> Option<Option<&'r str>>
fn size_hint(&self) -> (usize, Option<usize>)
fn count(self) -> usize

Auto Trait Implementations

impl<'r> Freeze for CaptureNames<'r>

impl<'r> RefUnwindSafe for CaptureNames<'r>

impl<'r> Send for CaptureNames<'r>

impl<'r> Sync for CaptureNames<'r>

impl<'r> Unpin for CaptureNames<'r>

impl<'r> UnsafeUnpin for CaptureNames<'r>

impl<'r> UnwindSafe for CaptureNames<'r>

Blanket Implementations

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

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

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

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

impl<T> CloneToUninit for CaptureNames<'r> where T: Clone,

impl<T> From<T> for CaptureNames<'r>

impl<T> ToOwned for CaptureNames<'r> where T: Clone,

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

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

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