pub struct NotEscaped<Prefix: Pattern, Inner: Pattern>(pub Prefix, pub Inner);Expand description
Pattern that matches pattern Inner not escaped by Prefix.
“escaped” here means that the pattern Inner is preceded by a Prefix that’s not preceded by
itself.
For example, for a pattern NotEscaped('\', '0'), the strings “0”, “\0” & “\\\0” will have
a match, but the strings “\0”, “\ \0” & “\\\\0” won’t.
Tuple Fields§
§0: Prefix§1: InnerTrait Implementations§
Source§impl<Prefix: Clone + Pattern, Inner: Clone + Pattern> Clone for NotEscaped<Prefix, Inner>
impl<Prefix: Clone + Pattern, Inner: Clone + Pattern> Clone for NotEscaped<Prefix, Inner>
Source§fn clone(&self) -> NotEscaped<Prefix, Inner>
fn clone(&self) -> NotEscaped<Prefix, Inner>
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<Prefix: Pattern, Inner: Pattern> Pattern for NotEscaped<Prefix, Inner>
impl<Prefix: Pattern, Inner: Pattern> Pattern for NotEscaped<Prefix, Inner>
Source§fn immediate_match<I: Input>(&self, input: I) -> Result<(I, I), I>
fn immediate_match<I: Input>(&self, input: I) -> Result<(I, I), I>
The return values are (rest of the input, matched fragment at the beginning). Read more
Source§fn trailing_match<I: Input>(&self, input: I) -> Result<(I, I), I>
fn trailing_match<I: Input>(&self, input: I) -> Result<(I, I), I>
Like
Pattern::immediate_match, but matches at the end of input.
The return values are (the input before the match, the match) Read moreSource§fn trailing_matches_counted<I: Input>(&self, input: I) -> (I, usize)
fn trailing_matches_counted<I: Input>(&self, input: I) -> (I, usize)
Like
Pattern::immediate_matches_counted, but matches at the end of input,
and doesn’t return the matched fragment of the input. Read moreSource§fn first_match<I: Input>(&self, input: I) -> Result<(I, (I, I)), I>
fn first_match<I: Input>(&self, input: I) -> Result<(I, (I, I)), I>
The return values are (the match + rest of the input, (string before the match, the match)). Read more
Source§fn first_match_ex<I: Input>(&self, input: I) -> Result<(I, (I, I)), I>
fn first_match_ex<I: Input>(&self, input: I) -> Result<(I, (I, I)), I>
Like
Pattern::first_match, but the match is excluded from the rest of the input. Read moreSource§fn immediate_matches<I: Input>(&self, input: I) -> (I, I)
fn immediate_matches<I: Input>(&self, input: I) -> (I, I)
The return values are (rest of the input, contiguous matched fragments from the beginning). Read more
Source§fn immediate_matches_counted<I: Input>(&self, input: I) -> (I, (I, usize))
fn immediate_matches_counted<I: Input>(&self, input: I) -> (I, (I, usize))
Like
Pattern::immediate_matches, but also counts the number of matches. Read moreSource§fn by_ref(&self) -> Ref<'_, Self>
fn by_ref(&self) -> Ref<'_, Self>
Get the pattern by reference to avoid moving it, which will happen in generic code Read more
Source§fn or<Other: Pattern>(self, other: Other) -> Union<Self, Other>where
Self: Sized,
fn or<Other: Pattern>(self, other: Other) -> Union<Self, Other>where
Self: Sized,
Combine
self and another pattern into a pattern that matches either of them in a
short-circuiting manner, with self tried first. Read moreSource§fn not_escaped_by<Prefix: Pattern>(
self,
prefix: Prefix,
) -> NotEscaped<Prefix, Self>where
Self: Sized,
fn not_escaped_by<Prefix: Pattern>(
self,
prefix: Prefix,
) -> NotEscaped<Prefix, Self>where
Self: Sized,
Create a pattern that’ll match
self only if it’s not escaped (immediately preceded)
by the provided pattern.Source§fn not_enclosed_by<Enclosure: Pattern>(
self,
enc: Enclosure,
) -> NotEnclosed<Enclosure, Self>where
Self: Sized,
fn not_enclosed_by<Enclosure: Pattern>(
self,
enc: Enclosure,
) -> NotEnclosed<Enclosure, Self>where
Self: Sized,
Create a pattern that’ll match
self only if it’s not enclosed (preceded & superceded) by
the provided pattern.impl<Prefix: Copy + Pattern, Inner: Copy + Pattern> Copy for NotEscaped<Prefix, Inner>
Auto Trait Implementations§
impl<Prefix, Inner> Freeze for NotEscaped<Prefix, Inner>
impl<Prefix, Inner> RefUnwindSafe for NotEscaped<Prefix, Inner>where
Prefix: RefUnwindSafe,
Inner: RefUnwindSafe,
impl<Prefix, Inner> Send for NotEscaped<Prefix, Inner>
impl<Prefix, Inner> Sync for NotEscaped<Prefix, Inner>
impl<Prefix, Inner> Unpin for NotEscaped<Prefix, Inner>
impl<Prefix, Inner> UnwindSafe for NotEscaped<Prefix, Inner>where
Prefix: UnwindSafe,
Inner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more