Enum quad_compat_rhai::plugin::EvalAltResult [−][src]
#[non_exhaustive]
pub enum EvalAltResult {
Show 27 variants
ErrorSystem(String, Box<dyn Error>),
ErrorParsing(ParseErrorType, Position),
ErrorVariableNotFound(String, Position),
ErrorFunctionNotFound(String, Position),
ErrorInFunctionCall(String, String, Box<EvalAltResult>, Position),
ErrorModuleNotFound(String, Position),
ErrorInModule(String, Box<EvalAltResult>, Position),
ErrorUnboundThis(Position),
ErrorMismatchDataType(String, String, Position),
ErrorMismatchOutputType(String, String, Position),
ErrorArrayBounds(usize, INT, Position),
ErrorStringBounds(usize, INT, Position),
ErrorBitFieldBounds(usize, INT, Position),
ErrorIndexingType(String, Position),
ErrorFor(Position),
ErrorDataRace(String, Position),
ErrorAssignmentToConstant(String, Position),
ErrorDotExpr(String, Position),
ErrorArithmetic(String, Position),
ErrorTooManyOperations(Position),
ErrorTooManyModules(Position),
ErrorStackOverflow(Position),
ErrorDataTooLarge(String, Position),
ErrorTerminated(Dynamic, Position),
ErrorRuntime(Dynamic, Position),
LoopBreak(bool, Position),
Return(Dynamic, Position),
}
Expand description
Evaluation result.
All wrapped Position
values represent the location in the script where the error occurs.
Thread Safety
Currently, EvalAltResult
is neither Send
nor Sync
.
Turn on the sync
feature to make it Send
+
Sync
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
ErrorSystem(String, Box<dyn Error>)
System error. Wrapped values are the error message and the internal error.
ErrorParsing(ParseErrorType, Position)
Syntax error.
ErrorVariableNotFound(String, Position)
Usage of an unknown variable. Wrapped value is the variable name.
ErrorFunctionNotFound(String, Position)
Call to an unknown function. Wrapped value is the function signature.
ErrorInFunctionCall(String, String, Box<EvalAltResult>, Position)
An error has occurred inside a called function. Wrapped values are the function name, function source, and the interior error.
ErrorModuleNotFound(String, Position)
ErrorInModule(String, Box<EvalAltResult>, Position)
An error has occurred while loading a module. Wrapped value are the module name and the interior error.
ErrorUnboundThis(Position)
Tuple Fields
0: Position
Access to this
that is not bound.
ErrorMismatchDataType(String, String, Position)
Data is not of the required type. Wrapped values are the type requested and type of the actual result.
ErrorMismatchOutputType(String, String, Position)
Returned type is not the same as the required output type. Wrapped values are the type requested and type of the actual result.
ErrorArrayBounds(usize, INT, Position)
Array access out-of-bounds. Wrapped values are the current number of elements in the array and the index number.
ErrorStringBounds(usize, INT, Position)
String indexing out-of-bounds. Wrapped values are the current number of characters in the string and the index number.
ErrorBitFieldBounds(usize, INT, Position)
Bit-field indexing out-of-bounds. Wrapped values are the current number of bits in the bit-field and the index number.
ErrorIndexingType(String, Position)
Trying to index into a type that has no indexer function defined. Wrapped value is the type name.
ErrorFor(Position)
Tuple Fields
0: Position
The for
statement encounters a type that is not an iterator.
ErrorDataRace(String, Position)
Data race detected when accessing a variable. Wrapped value is the variable name.
ErrorAssignmentToConstant(String, Position)
Assignment to a constant variable. Wrapped value is the variable name.
ErrorDotExpr(String, Position)
Inappropriate property access. Wrapped value is the property name.
ErrorArithmetic(String, Position)
Arithmetic error encountered. Wrapped value is the error message.
ErrorTooManyOperations(Position)
Tuple Fields
0: Position
Number of operations over maximum limit.
ErrorTooManyModules(Position)
Tuple Fields
0: Position
Modules over maximum limit.
ErrorStackOverflow(Position)
Tuple Fields
0: Position
Call stack over maximum limit.
ErrorDataTooLarge(String, Position)
Data value over maximum size limit. Wrapped value is the type name.
ErrorTerminated(Dynamic, Position)
The script is prematurely terminated. Wrapped value is the termination token.
ErrorRuntime(Dynamic, Position)
Run-time error encountered. Wrapped value is the error token.
LoopBreak(bool, Position)
Breaking out of loops - not an error if within a loop.
The wrapped value, if true, means breaking clean out of the loop (i.e. a break
statement).
The wrapped value, if false, means breaking the current context (i.e. a continue
statement).
Return(Dynamic, Position)
Not an error: Value returned from a script via the return
keyword.
Wrapped value is the result value.
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.