pub struct CaptureGroup {
pub name: String,
pub index: usize,
pub pattern: String,
}Expand description
A named capture group extracted from a Perl regex pattern.
Named captures use the (?<name>...) syntax introduced in Perl 5.10.
Captured text is accessible via $+{name} or $1, $2, … by index.
Fields§
§name: StringThe capture group name from (?<name>...).
index: usizeOne-based capture index (counting all capturing groups left to right).
pattern: StringThe sub-pattern inside the capture group.
Trait Implementations§
Source§impl Clone for CaptureGroup
impl Clone for CaptureGroup
Source§fn clone(&self) -> CaptureGroup
fn clone(&self) -> CaptureGroup
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CaptureGroup
impl RefUnwindSafe for CaptureGroup
impl Send for CaptureGroup
impl Sync for CaptureGroup
impl Unpin for CaptureGroup
impl UnsafeUnpin for CaptureGroup
impl UnwindSafe for CaptureGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more