#[non_exhaustive]pub enum DiagnosticKind {
UnknownContent {
text: String,
},
Unexpected {
actual: String,
expected: Vec<TokenType>,
},
}Available on crate feature
alloc only.Expand description
Category of parse diagnostic emitted during recovery.
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.
UnknownContent
text the parser could not interpret (e.g. invalid token).
Unexpected
the parser expected one of expected token types but found actual.
Trait Implementations§
Source§impl Clone for DiagnosticKind
impl Clone for DiagnosticKind
Source§fn clone(&self) -> DiagnosticKind
fn clone(&self) -> DiagnosticKind
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 Debug for DiagnosticKind
impl Debug for DiagnosticKind
Source§impl<'de> Deserialize<'de> for DiagnosticKind
impl<'de> Deserialize<'de> for DiagnosticKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DiagnosticKind
impl Display for DiagnosticKind
Source§impl Hash for DiagnosticKind
impl Hash for DiagnosticKind
Source§impl PartialEq for DiagnosticKind
impl PartialEq for DiagnosticKind
Source§impl Serialize for DiagnosticKind
impl Serialize for DiagnosticKind
impl Eq for DiagnosticKind
impl StructuralPartialEq for DiagnosticKind
Auto Trait Implementations§
impl Freeze for DiagnosticKind
impl RefUnwindSafe for DiagnosticKind
impl Send for DiagnosticKind
impl Sync for DiagnosticKind
impl Unpin for DiagnosticKind
impl UnsafeUnpin for DiagnosticKind
impl UnwindSafe for DiagnosticKind
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