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 Freeze for NoCaptures
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