pub struct NonCaptureGroup<'a>(/* private fields */);
Expand description
Regex syntax for a non-capturing group of the regex input
Non-capturing groups are not included in the groups field of a Pattern object. They are useful for when you want to group parts of a regex string together without affecting the numbered groups.
§Example
use readable_regex::solvers::{Concat, NonCaptureGroup};
use readable_regex::ReadableRe;
use std::fmt::Display;
let query = ReadableRe::NonCaptureGroup(
NonCaptureGroup::new(ReadableRe::Raw("pattern_to_look_for"))
);
assert_eq!(
query.to_string(),
"(?:pattern_to_look_for)"
);
Implementations§
Source§impl<'a> NonCaptureGroup<'a>
impl<'a> NonCaptureGroup<'a>
pub fn new(re: ReadableRe<'a>) -> Self
Trait Implementations§
Source§impl<'a> Clone for NonCaptureGroup<'a>
impl<'a> Clone for NonCaptureGroup<'a>
Source§fn clone(&self) -> NonCaptureGroup<'a>
fn clone(&self) -> NonCaptureGroup<'a>
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 moreSource§impl<'a> Display for NonCaptureGroup<'a>
impl<'a> Display for NonCaptureGroup<'a>
Source§impl<'a> FromIterator<ReadableRe<'a>> for NonCaptureGroup<'a>
impl<'a> FromIterator<ReadableRe<'a>> for NonCaptureGroup<'a>
Source§fn from_iter<T: IntoIterator<Item = ReadableRe<'a>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ReadableRe<'a>>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl<'a> Freeze for NonCaptureGroup<'a>
impl<'a> RefUnwindSafe for NonCaptureGroup<'a>
impl<'a> Send for NonCaptureGroup<'a>
impl<'a> Sync for NonCaptureGroup<'a>
impl<'a> Unpin for NonCaptureGroup<'a>
impl<'a> UnwindSafe for NonCaptureGroup<'a>
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