Struct jmespath::Expression [] [src]

pub struct Expression {
    // some fields omitted
}

A compiled JMESPath expression.

Methods

impl Expression
[src]

fn new(expression: &str) -> Result<ExpressionError>

Creates a new JMESPath expression from an expression string.

fn with_fn_dispatcher(expression: &str, fn_dispatcher: Arc<FnDispatcher>) -> Result<ExpressionError>

Creates a new JMESPath expression using a custom tree interpreter. Customer interpreters may be desired when you wish to utilize custom JMESPath functions in your expressions.

fn search<T: Serialize>(&self, data: T) -> SearchResult

Returns the result of searching Serde data with the compiled expression.

fn search_variable(&self, data: &RcVar) -> SearchResult

Returns the result of searching a JMESPath variable with the compiled expression.

NOTE: This specific method could eventually be removed once specialization lands in Rust. See https://github.com/rust-lang/rfcs/pull/1210

fn as_str(&self) -> &str

Returns the JMESPath expression from which the Expression was compiled.

fn as_ast(&self) -> &Ast

Returns the AST of the parsed JMESPath expression.

Trait Implementations

impl Display for Expression
[src]

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

Shows the original jmespath expression.

impl Debug for Expression
[src]

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

Shows the original jmespath expression.

impl PartialEq for Expression
[src]

Equality comparison is based on the original string.

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

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

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

This method tests for !=.