[][src]Struct grep_regex::RegexCaptures

pub struct RegexCaptures(_);

Represents the match offsets of each capturing group in a match.

The first, or 0th capture group, always corresponds to the entire match and is guaranteed to be present when a match occurs. The next capture group, at index 1, corresponds to the first capturing group in the regex, ordered by the position at which the left opening parenthesis occurs.

Note that not all capturing groups are guaranteed to be present in a match. For example, in the regex, (?P<foo>\w)|(?P<bar>\W), only one of foo or bar will ever be set in any given match.

In order to access a capture group by name, you'll need to first find the index of the group using the corresponding matcher's capture_index method, and then use that index with RegexCaptures::get.

Trait Implementations

impl Captures for RegexCaptures[src]

impl Clone for RegexCaptures[src]

impl Debug for RegexCaptures[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.