pub enum ForthError {
}
Expand description
This Enum lists the errors that the Forth Interpreter might return
Variants§
UnknownError
UnknownToken(String)
NumberStackUnderflow
LoopStackUnderflow
ScratchStackUnderflow
InvalidCellOperation
InvalidSyntax(String)
MissingSemicolonAfterColon
MissingCommandAfterColon
SemicolonBeforeColon
UnhandledTrap
RanOutOfGas
InternalNumericOverflow
Trait Implementations§
Source§impl Debug for ForthError
impl Debug for ForthError
Source§impl From<ForthError> for i32
Helper to convert ForthError codes to numeric codes for exit()
impl From<ForthError> for i32
Helper to convert ForthError codes to numeric codes for exit()
Source§fn from(err: ForthError) -> Self
fn from(err: ForthError) -> Self
Converts to this type from the input type.
Source§impl From<StackMachineError> for ForthError
Convert StackMachineError to a ForthError so our Interpreter functions can
return a single Error type.
impl From<StackMachineError> for ForthError
Convert StackMachineError to a ForthError so our Interpreter functions can return a single Error type.
Source§fn from(err: StackMachineError) -> ForthError
fn from(err: StackMachineError) -> ForthError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ForthError
impl RefUnwindSafe for ForthError
impl Send for ForthError
impl Sync for ForthError
impl Unpin for ForthError
impl UnwindSafe for ForthError
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