pub enum AstError {
Empty,
NoEof,
UnexpectedToken {
token: Token,
additional: Option<Cow<'static, str>>,
},
}
Expand description
An error that occurs when creating the ast after tokenizing
Variants§
Empty
There were no tokens passed, which shouldn’t happen normally
NoEof
Tokens passed had no end of file token, which shouldn’t happen normally
UnexpectedToken
Fields
An unexpected token, the most likely scenario when getting an AstError
Trait Implementations§
source§impl<'de> Deserialize<'de> for AstError
impl<'de> Deserialize<'de> for AstError
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 Error for AstError
impl Error for AstError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for AstError
impl PartialEq for AstError
impl Eq for AstError
impl StructuralEq for AstError
impl StructuralPartialEq for AstError
Auto Trait Implementations§
impl RefUnwindSafe for AstError
impl Send for AstError
impl Sync for AstError
impl Unpin for AstError
impl UnwindSafe for AstError
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