[][src]Struct fancy_regex::Captures

pub struct Captures<'t>(_);

A set of capture groups found for a regex.

Methods

impl<'t> Captures<'t>[src]

pub fn get(&self, i: usize) -> Option<Match<'t>>[src]

Get the capture group by its index in the regex.

If there is no match for that group or the index does not correspond to a group, None is returned. The index 0 returns the whole match.

Important traits for SubCaptureMatches<'c, 't>
pub fn iter<'c>(&'c self) -> SubCaptureMatches<'c, 't>[src]

Iterate over the captured groups in order in which they appeared in the regex. The first capture corresponds to the whole match.

pub fn len(&self) -> usize[src]

How many groups were captured.

Trait Implementations

impl<'t> Debug for Captures<'t>[src]

Auto Trait Implementations

impl<'t> RefUnwindSafe for Captures<'t>

impl<'t> Send for Captures<'t>

impl<'t> Sync for Captures<'t>

impl<'t> Unpin for Captures<'t>

impl<'t> UnwindSafe for Captures<'t>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.