Enum cel_interpreter::ExecutionError
source · pub enum ExecutionError {
Show 17 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(Member),
FunctionError {
function: String,
message: String,
},
}Variants§
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(Member)
Indicates that a Member::Fields construction was attempted
which is not yet supported.
FunctionError
Indicates that a function had an error during execution.
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> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)