Struct grep_matcher::NoCaptures
source · pub struct NoCaptures(_);Expand description
NoCaptures provides an always-empty implementation of the Captures trait.
This type is useful for implementations of Matcher that don’t support
capturing groups.
Implementations§
source§impl NoCaptures
impl NoCaptures
sourcepub fn new() -> NoCaptures
pub fn new() -> NoCaptures
Create an empty set of capturing groups.
Trait Implementations§
source§impl Captures for NoCaptures
impl Captures for NoCaptures
source§fn len(&self) -> usize
fn len(&self) -> usize
Return the total number of capturing groups. This includes capturing
groups that have not matched anything.
source§fn get(&self, _: usize) -> Option<Match>
fn get(&self, _: usize) -> Option<Match>
Return the capturing group match at the given index. If no match of
that capturing group exists, then this returns
None. Read moresource§impl Clone for NoCaptures
impl Clone for NoCaptures
source§fn clone(&self) -> NoCaptures
fn clone(&self) -> NoCaptures
Returns a copy 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 more