Struct SubCaptureMatches
pub struct SubCaptureMatches<'c, 'h> { /* private fields */ }
An iterator over all group matches in a Captures value.
This iterator yields values of type Option<Match<'h>>, where 'h is the
lifetime of the haystack that the matches are for. The order of elements
yielded corresponds to the order of the opening parenthesis for the group
in the regex pattern. None is yielded for groups that did not participate
in the match.
The first element always corresponds to the implicit group for the overall
match. Since this iterator is created by a Captures value, and a
Captures value is only created when a match occurs, it follows that the
first element yielded by this iterator is guaranteed to be non-None.
The lifetime 'c corresponds to the lifetime of the Captures value that
created this iterator, and the lifetime 'h corresponds to the originally
matched haystack.
Trait Implementations
impl<'c, 'h> Clone for SubCaptureMatches<'c, 'h>
fn clone(&self) -> SubCaptureMatches<'c, 'h>
impl<'c, 'h> Debug for SubCaptureMatches<'c, 'h>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'c, 'h> ExactSizeIterator for SubCaptureMatches<'c, 'h>
impl<'c, 'h> FusedIterator for SubCaptureMatches<'c, 'h>
impl<'c, 'h> Iterator for SubCaptureMatches<'c, 'h>
type Item = Option<Match<'h>>;fn next(&mut self) -> Option<Option<Match<'h>>>fn size_hint(&self) -> (usize, Option<usize>)fn count(self) -> usize
Auto Trait Implementations
impl<'c, 'h> Freeze for SubCaptureMatches<'c, 'h>
impl<'c, 'h> RefUnwindSafe for SubCaptureMatches<'c, 'h>
impl<'c, 'h> Send for SubCaptureMatches<'c, 'h>
impl<'c, 'h> Sync for SubCaptureMatches<'c, 'h>
impl<'c, 'h> Unpin for SubCaptureMatches<'c, 'h>
impl<'c, 'h> UnsafeUnpin for SubCaptureMatches<'c, 'h>
impl<'c, 'h> UnwindSafe for SubCaptureMatches<'c, 'h>
Blanket Implementations
impl<I> IntoIterator for SubCaptureMatches<'c, 'h>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for SubCaptureMatches<'c, 'h>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SubCaptureMatches<'c, 'h>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SubCaptureMatches<'c, 'h>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SubCaptureMatches<'c, 'h>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SubCaptureMatches<'c, 'h>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for SubCaptureMatches<'c, 'h>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for SubCaptureMatches<'c, 'h>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for SubCaptureMatches<'c, 'h>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for SubCaptureMatches<'c, 'h>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>