pub enum ASTError {
MatchItemMissing,
InvalidCapture,
TreeBuildError,
NoMatchFound,
NodeIdMissing(String),
StartNodeNotFound,
NodeNotInArena(String),
RegexError,
}Expand description
Represents errors that can occur during AST construction or analysis.
§Variants
RegexError(String): Failure to compile a regex pattern.NodeNotInArena(String): Attempt to access an invalid node ID.InvalidNodeData(String): Node data is missing required fields (e.g.,body_start).
Variants§
MatchItemMissing
InvalidCapture
TreeBuildError
NoMatchFound
NodeIdMissing(String)
StartNodeNotFound
NodeNotInArena(String)
RegexError
Trait Implementations§
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)>
Returns 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()
Auto Trait Implementations§
impl Freeze for ASTError
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