#[non_exhaustive]pub enum ExpectedToken {
WhereAfterModuleHeader,
ModuleNameAfterImport,
TemplateNameAfterInterfaceInstanceFor,
FieldNameTypePair,
EqualsAfterGuard,
EqualsOrGuardedRightHandSide,
ProjectionFieldAfterDot,
ThenKeyword,
ElseKeyword,
OfKeywordInCaseExpression,
ArrowInGuardedCaseAlternative,
ArrowInCaseAlternative,
}Expand description
Expected token or token class for a recoverable parser diagnostic.
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.
WhereAfterModuleHeader
ModuleNameAfterImport
TemplateNameAfterInterfaceInstanceFor
FieldNameTypePair
EqualsAfterGuard
EqualsOrGuardedRightHandSide
ProjectionFieldAfterDot
ThenKeyword
ElseKeyword
OfKeywordInCaseExpression
ArrowInGuardedCaseAlternative
ArrowInCaseAlternative
Trait Implementations§
Source§impl Clone for ExpectedToken
impl Clone for ExpectedToken
Source§fn clone(&self) -> ExpectedToken
fn clone(&self) -> ExpectedToken
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 moreimpl Copy for ExpectedToken
Source§impl Debug for ExpectedToken
impl Debug for ExpectedToken
impl Eq for ExpectedToken
Source§impl PartialEq for ExpectedToken
impl PartialEq for ExpectedToken
Source§fn eq(&self, other: &ExpectedToken) -> bool
fn eq(&self, other: &ExpectedToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExpectedToken
Auto Trait Implementations§
impl Freeze for ExpectedToken
impl RefUnwindSafe for ExpectedToken
impl Send for ExpectedToken
impl Sync for ExpectedToken
impl Unpin for ExpectedToken
impl UnsafeUnpin for ExpectedToken
impl UnwindSafe for ExpectedToken
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