[][src]Struct regex_syntax::ast::Group

pub struct Group {
    pub span: Span,
    pub kind: GroupKind,
    pub ast: Box<Ast>,
}

A grouped regular expression.

This includes both capturing and non-capturing groups. This does not include flag-only groups like (?is), but does contain any group that contains a sub-expression, e.g., (a), (?P<name>a), (?:a) and (?is:a).

Fields

span: Span

The span of this group.

kind: GroupKind

The kind of this group.

ast: Box<Ast>

The regular expression in this group.

Methods

impl Group
[src]

pub fn flags(&self) -> Option<&Flags>
[src]

If this group is non-capturing, then this returns the (possibly empty) set of flags. Otherwise, None is returned.

pub fn is_capturing(&self) -> bool
[src]

Returns true if and only if this group is capturing.

pub fn capture_index(&self) -> Option<u32>
[src]

Returns the capture index of this group, if this is a capturing group.

This returns a capture index precisely when is_capturing is true.

Trait Implementations

impl PartialEq<Group> for Group
[src]

impl Eq for Group
[src]

impl Clone for Group
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Group
[src]

Auto Trait Implementations

impl Send for Group

impl Sync for Group

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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