#[non_exhaustive]pub enum Expectation {
Description(&'static str),
Keyword(&'static str),
Delimiter(&'static str),
Punctuation(&'static str),
Syntax(&'static str),
OpenDelimiter,
Boolean,
Literal,
Expression,
Shebang,
Comment,
}
Expand description
Something that describes an expectation or actuality.
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.
Description(&'static str)
A static description.
Keyword(&'static str)
A keyword like await
.
Delimiter(&'static str)
A delimiter.
Punctuation(&'static str)
A punctuation which can be a sequence of characters, like !=
.
Syntax(&'static str)
Expected a specific kind of syntax node.
OpenDelimiter
An open delimiter.
Boolean
A bolean.
Literal
A literal.
Expression
An expression.
Shebang
A shebang.
Comment
A comment.
Trait Implementations§
Source§impl Clone for Expectation
impl Clone for Expectation
Source§fn clone(&self) -> Expectation
fn clone(&self) -> Expectation
Returns a copy 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 Debug for Expectation
impl Debug for Expectation
Source§impl Display for Expectation
impl Display for Expectation
impl Copy for Expectation
Auto Trait Implementations§
impl Freeze for Expectation
impl RefUnwindSafe for Expectation
impl Send for Expectation
impl Sync for Expectation
impl Unpin for Expectation
impl UnwindSafe for Expectation
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)