Enum rsjsonnet_lang::program::EvalErrorKind

source ·
pub enum EvalErrorKind {
Show 41 variants StackOverflow, InfiniteRecursion, InvalidIndexedType { span: SpanId, got_type: EvalErrorValueType, }, StringIndexIsNotNumber { span: SpanId, got_type: EvalErrorValueType, }, ArrayIndexIsNotNumber { span: SpanId, got_type: EvalErrorValueType, }, NumericIndexIsNotValid { span: SpanId, index: String, }, NumericIndexOutOfRange { span: SpanId, index: usize, length: usize, }, ObjectIndexIsNotString { span: SpanId, got_type: EvalErrorValueType, }, RepeatedFieldName { span: SpanId, name: String, }, FieldNameIsNotString { span: SpanId, got_type: EvalErrorValueType, }, UnknownObjectField { span: SpanId, field_name: String, }, FieldOfNonObject { span: SpanId, }, SuperWithoutSuperObject { span: SpanId, }, ForSpecValueIsNotArray { span: SpanId, got_type: EvalErrorValueType, }, CondIsNotBool { span: SpanId, got_type: EvalErrorValueType, }, CalleeIsNotFunction { span: Option<SpanId>, got_type: EvalErrorValueType, }, TooManyCallArgs { span: Option<SpanId>, num_params: usize, }, UnknownCallParam { span: Option<SpanId>, param_name: String, }, RepeatedCallParam { span: Option<SpanId>, param_name: String, }, CallParamNotBound { span: Option<SpanId>, param_name: String, }, NativeCallFailed, InvalidUnaryOpType { span: SpanId, op: UnaryOp, rhs_type: EvalErrorValueType, }, InvalidBinaryOpTypes { span: Option<SpanId>, op: BinaryOp, lhs_type: EvalErrorValueType, rhs_type: EvalErrorValueType, }, NumberOverflow { span: Option<SpanId>, }, NumberNan { span: Option<SpanId>, }, DivByZero { span: Option<SpanId>, }, ShiftByNegative { span: Option<SpanId>, }, InvalidBuiltInFuncArgType { func_name: String, arg_index: usize, expected_types: Vec<EvalErrorValueType>, got_type: EvalErrorValueType, }, AssertFailed { span: SpanId, message: Option<String>, }, AssertEqualFailed { lhs: String, rhs: String, }, ExplicitError { span: SpanId, message: String, }, ImportFailed { span: SpanId, path: String, }, UnknownExtVar { name: String, }, ManifestFunction, CompareNullInequality, CompareBooleanInequality, CompareObjectInequality, CompareFunctions, CompareDifferentTypesInequality { lhs_type: EvalErrorValueType, rhs_type: EvalErrorValueType, }, PrimitiveEqualsNonPrimitive { got_type: EvalErrorValueType, }, Other { span: Option<SpanId>, message: String, },
}

Variants§

§

StackOverflow

§

InfiniteRecursion

§

InvalidIndexedType

Fields

§span: SpanId
§

StringIndexIsNotNumber

Fields

§span: SpanId
§

ArrayIndexIsNotNumber

Fields

§span: SpanId
§

NumericIndexIsNotValid

Fields

§span: SpanId
§index: String
§

NumericIndexOutOfRange

Fields

§span: SpanId
§index: usize
§length: usize
§

ObjectIndexIsNotString

Fields

§span: SpanId
§

RepeatedFieldName

Fields

§span: SpanId
§name: String
§

FieldNameIsNotString

Fields

§span: SpanId
§

UnknownObjectField

Fields

§span: SpanId
§field_name: String
§

FieldOfNonObject

Fields

§span: SpanId
§

SuperWithoutSuperObject

Fields

§span: SpanId
§

ForSpecValueIsNotArray

Fields

§span: SpanId
§

CondIsNotBool

Fields

§span: SpanId
§

CalleeIsNotFunction

Fields

§

TooManyCallArgs

Fields

§num_params: usize
§

UnknownCallParam

Fields

§param_name: String
§

RepeatedCallParam

Fields

§param_name: String
§

CallParamNotBound

Fields

§param_name: String
§

NativeCallFailed

§

InvalidUnaryOpType

Fields

§span: SpanId
§

InvalidBinaryOpTypes

§

NumberOverflow

Fields

§

NumberNan

Fields

§

DivByZero

Fields

§

ShiftByNegative

Fields

§

InvalidBuiltInFuncArgType

Fields

§func_name: String
§arg_index: usize
§expected_types: Vec<EvalErrorValueType>
§

AssertFailed

Fields

§span: SpanId
§message: Option<String>
§

AssertEqualFailed

Fields

§

ExplicitError

Fields

§span: SpanId
§message: String
§

ImportFailed

Fields

§span: SpanId
§path: String
§

UnknownExtVar

Fields

§name: String
§

ManifestFunction

§

CompareNullInequality

§

CompareBooleanInequality

§

CompareObjectInequality

§

CompareFunctions

§

CompareDifferentTypesInequality

§

PrimitiveEqualsNonPrimitive

Fields

§

Other

Fields

§message: String

Trait Implementations§

source§

impl Clone for EvalErrorKind

source§

fn clone(&self) -> EvalErrorKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EvalErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for EvalErrorKind

source§

fn eq(&self, other: &EvalErrorKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for EvalErrorKind

source§

impl StructuralPartialEq for EvalErrorKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.