Struct jmespath::Expression [] [src]

pub struct Expression<'a> { /* fields omitted */ }

A compiled JMESPath expression.

The compiled expression can be used multiple times without incurring the cost of re-parsing the expression each time. The expression may be shared between threads if JMESPath is compiled with the sync feature, which forces the use of an Arc instead of an Rc for runtime variables.

Methods

impl<'a> Expression<'a>
[src]

Creates a new JMESPath expression.

Normally you will create expressions using either jmespath::compile() or using a jmespath::Runtime.

Returns the result of searching data with the compiled expression.

The SearchResult contains a JMESPath Rcvar, or a reference counted Variable. This value can be used directly like a JSON object. Alternatively, Variable does implement Serde serialzation and deserialization, so it can easily be marshalled to another type.

Returns the JMESPath expression from which the Expression was compiled.

Note that this is the same value that is returned by calling to_string.

Returns the AST of the parsed JMESPath expression.

This can be useful for debugging purposes, caching, etc.

Trait Implementations

impl<'a> Display for Expression<'a>
[src]

Shows the jmespath expression as a string.

impl<'a> Debug for Expression<'a>
[src]

Formats the value using the given formatter.

impl<'a> PartialEq for Expression<'a>
[src]

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

This method tests for !=.