pub enum LustError {
LexerError {
line: usize,
column: usize,
message: String,
module: Option<String>,
},
ParserError {
line: usize,
column: usize,
message: String,
module: Option<String>,
},
TypeError {
message: String,
},
TypeErrorWithSpan {
message: String,
line: usize,
column: usize,
module: Option<String>,
},
CompileError(String),
CompileErrorWithSpan {
message: String,
line: usize,
column: usize,
module: Option<String>,
},
RuntimeError {
message: String,
},
RuntimeErrorWithTrace {
message: String,
function: String,
line: usize,
stack_trace: Vec<StackFrame>,
},
Unknown(String),
}Variants§
LexerError
ParserError
TypeError
TypeErrorWithSpan
CompileError(String)
CompileErrorWithSpan
RuntimeError
RuntimeErrorWithTrace
Unknown(String)
Trait Implementations§
Source§impl Error for LustError
impl Error for LustError
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()
impl StructuralPartialEq for LustError
Auto Trait Implementations§
impl Freeze for LustError
impl RefUnwindSafe for LustError
impl Send for LustError
impl Sync for LustError
impl Unpin for LustError
impl UnsafeUnpin for LustError
impl UnwindSafe for LustError
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