#[non_exhaustive]pub enum TextExpected<Slice> {
Whitespace,
InlineWhitespace,
Newline,
Digit(u32, u32),
AnyIdentifier,
Identifier(Slice),
Int,
}Expand description
Labels denoting a variety of text-related patterns.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Whitespace
Whitespace (for example: spaces, tabs, or newlines).
InlineWhitespace
Inline whitespace (for example: spaces or tabs).
Newline
A newline character or sequence.
Digit(u32, u32)
A numeric digit within the given radix range.
For example:
Digit(0, 10)implies any base-10 digitDigit(1, 16)implies any non-zero hexadecimal digit
AnyIdentifier
Any identifier.
Identifier(Slice)
A specific identifier.
Int
An integer was expected
Trait Implementations§
Source§impl<Slice: Clone> Clone for TextExpected<Slice>
impl<Slice: Clone> Clone for TextExpected<Slice>
Source§fn clone(&self) -> TextExpected<Slice>
fn clone(&self) -> TextExpected<Slice>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Slice: Debug> Debug for TextExpected<Slice>
impl<Slice: Debug> Debug for TextExpected<Slice>
Source§impl<'a, Slice: Debug, T> TryFrom<TextExpected<Slice>> for RichPattern<'a, T>
impl<'a, Slice: Debug, T> TryFrom<TextExpected<Slice>> for RichPattern<'a, T>
impl<Slice: Copy> Copy for TextExpected<Slice>
Auto Trait Implementations§
impl<Slice> Freeze for TextExpected<Slice>where
Slice: Freeze,
impl<Slice> RefUnwindSafe for TextExpected<Slice>where
Slice: RefUnwindSafe,
impl<Slice> Send for TextExpected<Slice>where
Slice: Send,
impl<Slice> Sync for TextExpected<Slice>where
Slice: Sync,
impl<Slice> Unpin for TextExpected<Slice>where
Slice: Unpin,
impl<Slice> UnsafeUnpin for TextExpected<Slice>where
Slice: UnsafeUnpin,
impl<Slice> UnwindSafe for TextExpected<Slice>where
Slice: 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 moreSource§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for T
impl<'p, T> Seq<'p, T> for T
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> S::Spanned
fn with_span(self, span: S) -> S::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.