pub struct Regex<const N: usize = 1>(/* private fields */);
Expand description
A regular expression (specifically, a POSIX ERE).
Internally, this may contain one of several engines depending on the expression.
The const generic N
represents the number of capture groups (including capture group 0 which is the entire expression).
It defaults to 1
(for just capture group 0), but you will need to specify it in the type for expressions with more capture groups.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for Regex<N>
impl<const N: usize> RefUnwindSafe for Regex<N>
impl<const N: usize> Send for Regex<N>
impl<const N: usize> Sync for Regex<N>
impl<const N: usize> Unpin for Regex<N>
impl<const N: usize> UnwindSafe for Regex<N>
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