pub struct AnchorEnd;Expand description
A Step which will match only if the cursor is over the last non-whitespace character in stream.
It will return that token.
For example, if you built SequenceExpr::default().t_aco("word").then(AnchorEnd) and ran it on This is a word, the resulting Span would only cover the final word token.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnchorEnd
impl RefUnwindSafe for AnchorEnd
impl Send for AnchorEnd
impl Sync for AnchorEnd
impl Unpin for AnchorEnd
impl UnwindSafe for AnchorEnd
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
Source§impl<E> ExprExt for E
impl<E> ExprExt for E
Source§fn iter_matches<'a>(
&'a self,
tokens: &'a [Token],
source: &'a [char],
) -> Box<dyn Iterator<Item = Span<Token>> + 'a>
fn iter_matches<'a>( &'a self, tokens: &'a [Token], source: &'a [char], ) -> Box<dyn Iterator<Item = Span<Token>> + 'a>
fn iter_matches_in_doc<'a>( &'a self, doc: &'a Document, ) -> Box<dyn Iterator<Item = Span<Token>> + 'a>
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>
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>
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 moreSource§impl<E> OwnedExprExt for Ewhere
E: Expr + 'static,
impl<E> OwnedExprExt for Ewhere
E: Expr + 'static,
Source§fn or(self, other: impl Expr + 'static) -> FirstMatchOf
fn or(self, other: impl Expr + 'static) -> FirstMatchOf
Returns an expression that matches either the current one or the expression contained in other.
Source§fn and(self, other: impl Expr + 'static) -> All
fn and(self, other: impl Expr + 'static) -> All
Returns an expression that matches only if both the current one and the expression contained in other do.
Source§fn and_not(self, other: impl Expr + 'static) -> All
fn and_not(self, other: impl Expr + 'static) -> All
Returns an expression that matches only if the current one matches and the expression contained in other does not.
Source§fn or_longest(self, other: impl Expr + 'static) -> LongestMatchOf
fn or_longest(self, other: impl Expr + 'static) -> LongestMatchOf
Returns an expression that matches the longest of the current one or the expression contained in other.
If you don’t need the longest match, prefer using the short-circuiting [Self::or()] instead.