pub struct Context<'a> {
    pub expression: &'a str,
    pub runtime: &'a Runtime,
    pub offset: usize,
}
Expand description

Context object used for error reporting.

The Context struct is mostly used when interacting between the interpreter and function implemenations. Unless you’re writing custom JMESPath functions, this struct is an implementation detail.

Fields

expression: &'a str

Expression string that is being interpreted.

runtime: &'a Runtime

JMESPath runtime used to compile the expression and call functions.

offset: usize

Ast offset that is currently being evaluated.

Implementations

Create a new context struct.

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 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.