Struct 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: SpanThe span of this group.
kind: GroupKindThe kind of this group.
ast: Box<Ast>The regular expression in this group.
Implementations
impl Group
fn flags(&self) -> Option<&Flags>If this group is non-capturing, then this returns the (possibly empty) set of flags. Otherwise,
Noneis returned.fn is_capturing(&self) -> boolReturns true if and only if this group is capturing.
fn capture_index(&self) -> Option<u32>Returns the capture index of this group, if this is a capturing group.
This returns a capture index precisely when
is_capturingistrue.
Trait Implementations
impl Clone for Group
fn clone(&self) -> Self
impl Debug for Group
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Group
impl PartialEq for Group
fn eq(&self, other: &Self) -> bool