Enum rhai::plugin::EvalAltResult [−][src]
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)
System error. Wrapped values are the error message and the internal error.
ErrorParsing(ParseErrorType, Position)
Syntax error.
Usage of an unknown variable. Wrapped value is the variable name.
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.
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)
Access to this
that is not bound.
Data is not of the required type. Wrapped values are the type requested and type of the actual result.
Returned type is not the same as the required output type. Wrapped values are the type requested and type of the actual result.
Array access out-of-bounds. Wrapped values are the current number of elements in the array and the index number.
String indexing out-of-bounds. Wrapped values are the current number of characters in the string and the index number.
Trying to index into a type that is not an array, an object map, or a string, and has no indexer function defined. Wrapped value is the type name.
ErrorInExpr(Position)
Invalid arguments for in
operator.
ErrorFor(Position)
The for
statement encounters a type that is not an iterator.
Data race detected when accessing a variable. Wrapped value is the variable name.
Assignment to a constant variable. Wrapped value is the variable name.
Inappropriate property access. Wrapped value is the property name.
Arithmetic error encountered. Wrapped value is the error message.
ErrorTooManyOperations(Position)
Number of operations over maximum limit.
ErrorTooManyModules(Position)
Modules over maximum limit.
ErrorStackOverflow(Position)
Call stack over maximum limit.
Data value over maximum size limit. Wrapped value is the type name.
The script is prematurely terminated. Wrapped value is the termination token.
Run-time error encountered. Wrapped value is the error token.
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).
Not an error: Value returned from a script via the return
keyword.
Wrapped value is the result value.
Implementations
impl EvalAltResult
[src]
pub fn is_pseudo_error(&self) -> bool
[src]
Is this a pseudo error? A pseudo error is one that does not occur naturally.
pub fn is_catchable(&self) -> bool
[src]
pub fn is_system_exception(&self) -> bool
[src]
pub fn position(&self) -> Position
[src]
Get the position of this error.
pub fn clear_position(&mut self) -> &mut SelfⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
Clear the position information of this error.
pub fn set_position(&mut self, new_position: Position)
[src]
Override the position of this error.
Trait Implementations
impl Debug for EvalAltResult
[src]
impl Display for EvalAltResult
[src]
impl Error for EvalAltResult
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<T> From<EvalAltResult> for Result<T, Box<EvalAltResult>>
[src]
fn from(err: EvalAltResult) -> Self
[src]
impl From<ParseError> for EvalAltResult
[src]
fn from(err: ParseError) -> Self
[src]
impl From<ParseErrorType> for EvalAltResult
[src]
fn from(err: ParseErrorType) -> Self
[src]
impl<T: AsRef<str>> From<T> for EvalAltResult
[src]
Auto Trait Implementations
impl !RefUnwindSafe for EvalAltResult
[src]
impl !Send for EvalAltResult
[src]
impl !Sync for EvalAltResult
[src]
impl Unpin for EvalAltResult
[src]
impl !UnwindSafe for EvalAltResult
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,