Struct grep_matcher::NoCaptures
source · pub struct NoCaptures(/* private fields */);
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 moreAuto Trait Implementations§
impl RefUnwindSafe for NoCaptures
impl Send for NoCaptures
impl Sync for NoCaptures
impl Unpin for NoCaptures
impl UnwindSafe for NoCaptures
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