[−][src]Enum rhai::ParseErrorType
Type of error encountered when parsing a script.
Some errors never appear when certain features are turned on. They still exist so that the application can turn features on and off without going through massive code changes to remove/add back enum variants in match statements.
Variants (Non-exhaustive)
BadInput(String)
Error in the script text. Wrapped value is the error message.
The script ends prematurely.
UnknownOperator(String)
An unknown operator is encountered. Wrapped value is the operator.
Expecting a particular token but not finding one. Wrapped values are the token and description.
MalformedCallExpr(String)
An expression in function call arguments ()
has syntax error. Wrapped value is the error description (if any).
MalformedIndexExpr(String)
An expression in indexing brackets []
has syntax error. Wrapped value is the error description (if any).
Never appears under the no_index
feature.
MalformedInExpr(String)
An expression in an in
expression has syntax error. Wrapped value is the error description (if any).
Never appears under the no_object
and no_index
features combination.
MalformedCapture(String)
A capturing has syntax error. Wrapped value is the error description (if any).
Never appears under the no_closure
feature.
DuplicatedProperty(String)
A map definition has duplicated property names. Wrapped value is the property name.
Never appears under the no_object
feature.
ForbiddenConstantExpr(String)
Invalid expression assigned to constant. Wrapped value is the name of the constant.
Missing a property name for custom types and maps.
Never appears under the no_object
feature.
Missing a variable name after the let
, const
or for
keywords.
Reserved(String)
An identifier is a reserved keyword.
ExprExpected(String)
Missing an expression. Wrapped value is the expression type.
Defining a function fn
in an appropriate place (e.g. inside another function).
Never appears under the no_function
feature.
Missing a function name after the fn
keyword.
Never appears under the no_function
feature.
FnMissingParams(String)
A function definition is missing the parameters list. Wrapped value is the function name.
Never appears under the no_function
feature.
A function definition has duplicated parameters. Wrapped values are the function name and parameter name.
Never appears under the no_function
feature.
FnMissingBody(String)
A function definition is missing the body. Wrapped value is the function name.
Never appears under the no_function
feature.
DuplicatedExport(String)
An export statement has duplicated names.
Never appears under the no_module
feature.
Export statement not at global level.
Never appears under the no_module
feature.
Assignment to a copy of a value.
AssignmentToConstant(String)
Assignment to an a constant variable. Wrapped value is the constant variable name.
Expression exceeding the maximum levels of complexity.
Never appears under the unchecked
feature.
Literal exceeding the maximum size. Wrapped values are the data type name and the maximum size.
Never appears under the unchecked
feature.
Break statement not inside a loop.
Trait Implementations
impl Clone for ParseErrorType
[src]
fn clone(&self) -> ParseErrorType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ParseErrorType
[src]
impl Display for ParseErrorType
[src]
impl Eq for ParseErrorType
[src]
impl<'_> From<&'_ LexError> for ParseErrorType
[src]
impl From<ParseErrorType> for Box<EvalAltResult>
[src]
fn from(err: ParseErrorType) -> Self
[src]
impl Hash for ParseErrorType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ParseErrorType> for ParseErrorType
[src]
fn eq(&self, other: &ParseErrorType) -> bool
[src]
fn ne(&self, other: &ParseErrorType) -> bool
[src]
impl StructuralEq for ParseErrorType
[src]
impl StructuralPartialEq for ParseErrorType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ParseErrorType
impl Send for ParseErrorType
impl Sync for ParseErrorType
impl Unpin for ParseErrorType
impl UnwindSafe for ParseErrorType
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,
fn borrow(&self) -> &TⓘImportant traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?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]
Important traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?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,
fn borrow_mut(&mut self) -> &mut TⓘImportant traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?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]
Important traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,