#[non_exhaustive]pub enum ExecutionError {
Show 20 variants
InvalidArgumentCount {
expected: usize,
actual: usize,
},
UnsupportedTargetType {
target: Value,
},
NotSupportedAsMethod {
method: String,
target: Value,
},
UnsupportedKeyType(Value),
UnexpectedType {
got: String,
want: String,
},
NoSuchKey(Arc<String>),
UndeclaredReference(Arc<String>),
MissingArgumentOrTarget,
ValuesNotComparable(Value, Value),
UnsupportedUnaryOperator(&'static str, Value),
UnsupportedBinaryOperator(&'static str, Value, Value),
UnsupportedMapIndex(Value),
UnsupportedListIndex(Value),
UnsupportedIndex(Value, Value),
UnsupportedFunctionCallIdentifierType(Expression),
UnsupportedFieldsConstruction(SelectExpr),
FunctionError {
function: String,
message: String,
},
DivisionByZero(Value),
RemainderByZero(Value),
Overflow(&'static str, Value, Value),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidArgumentCount
UnsupportedTargetType
NotSupportedAsMethod
UnsupportedKeyType(Value)
Indicates that the script attempted to use a value as a key in a map, but the type of the value was not supported as a key.
UnexpectedType
NoSuchKey(Arc<String>)
Indicates that the script attempted to reference a key on a type that was missing the requested key.
UndeclaredReference(Arc<String>)
Indicates that the script attempted to reference an undeclared variable method, or function.
MissingArgumentOrTarget
Indicates that a function expected to be called as a method, or to be called with at least one parameter.
ValuesNotComparable(Value, Value)
Indicates that a comparison could not be performed.
UnsupportedUnaryOperator(&'static str, Value)
Indicates that an operator was used on a type that does not support it.
UnsupportedBinaryOperator(&'static str, Value, Value)
Indicates that an unsupported binary operator was applied on two values where it’s unsupported, for example list + map.
UnsupportedMapIndex(Value)
Indicates that an unsupported type was used to index a map
UnsupportedListIndex(Value)
Indicates that an unsupported type was used to index a list
UnsupportedIndex(Value, Value)
Indicates that an unsupported type was used to index a list
UnsupportedFunctionCallIdentifierType(Expression)
Indicates that a function call occurred without an [Expression::Ident
]
as the function identifier.
UnsupportedFieldsConstruction(SelectExpr)
Indicates that a [Member::Fields
] construction was attempted
which is not yet supported.
FunctionError
Indicates that a function had an error during execution.
DivisionByZero(Value)
RemainderByZero(Value)
Overflow(&'static str, Value, Value)
Implementations§
Source§impl ExecutionError
impl ExecutionError
pub fn no_such_key(name: &str) -> Self
pub fn undeclared_reference(name: &str) -> Self
pub fn invalid_argument_count(expected: usize, actual: usize) -> Self
pub fn function_error<E: ToString>(function: &str, error: E) -> Self
pub fn unsupported_target_type(target: Value) -> Self
pub fn not_supported_as_method(method: &str, target: Value) -> Self
pub fn unsupported_key_type(value: Value) -> Self
pub fn missing_argument_or_target() -> Self
Trait Implementations§
Source§impl Clone for ExecutionError
impl Clone for ExecutionError
Source§fn clone(&self) -> ExecutionError
fn clone(&self) -> ExecutionError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ExecutionError
impl Debug for ExecutionError
Source§impl Display for ExecutionError
impl Display for ExecutionError
Source§impl Error for ExecutionError
impl Error for ExecutionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ExecutionError> for ResolveResult
impl From<ExecutionError> for ResolveResult
Source§fn from(value: ExecutionError) -> Self
fn from(value: ExecutionError) -> Self
Source§impl PartialEq for ExecutionError
impl PartialEq for ExecutionError
impl StructuralPartialEq for ExecutionError
Auto Trait Implementations§
impl Freeze for ExecutionError
impl RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl Sync for ExecutionError
impl Unpin for ExecutionError
impl UnwindSafe for ExecutionError
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T
behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T
behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T
behind Rc
pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T
behind Arc
pointer