pub enum RuntimeError {
    InvalidSlice,
    TooManyArguments {
        expected: usize,
        actual: usize,
    },
    NotEnoughArguments {
        expected: usize,
        actual: usize,
    },
    UnknownFunction(String),
    InvalidType {
        expected: String,
        actual: String,
        position: usize,
    },
    InvalidReturnType {
        expected: String,
        actual: String,
        position: usize,
        invocation: usize,
    },
}
Expand description

Runtime JMESPath error

Variants

InvalidSlice

Encountered when a slice expression uses a step of 0

TooManyArguments

Fields

expected: usize

Expeced number of arguments.

actual: usize

Provided number of arguments.

Encountered when too many arguments are provided to a function.

NotEnoughArguments

Fields

expected: usize

Expeced number of arguments.

actual: usize

Provided number of arguments.

Encountered when too few arguments are provided to a function.

UnknownFunction(String)

Encountered when an unknown function is called.

InvalidType

Fields

expected: String

Expected type.

actual: String

Provided type.

position: usize

Argument position when calling the function.

Encountered when a type of variable given to a function is invalid.

InvalidReturnType

Fields

expected: String

Expected return type.

actual: String

Actual return type.

position: usize

Argument position from which the expression reference was invoked.

invocation: usize

Which invocation iteration of the expression reference failed.

Encountered when an expression reference returns an invalid type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.