Struct jmespath::Runtime
[−]
[src]
pub struct Runtime { /* fields omitted */ }
Compiles JMESPath expressions.
Most use cases don't need to worry about how Runtime works. You really only need to create your own Runtimes if you are utilizing custom functions in your expressions.
Methods
impl Runtime
[src]
fn new() -> Runtime
Creates a new Runtime.
fn compile<'a>(
&'a self,
expression: &str
) -> Result<Expression<'a>, JmespathError>
&'a self,
expression: &str
) -> Result<Expression<'a>, JmespathError>
Creates a new JMESPath expression from an expression string.
The provided expression is expected to adhere to the JMESPath grammar: http://jmespath.org/specification.html
fn register_function(&mut self, name: &str, f: Box<Function>)
Adds a new function to the runtime.
fn deregister_function(&mut self, name: &str) -> Option<Box<Function>>
Removes a function from the runtime.
Returns the function that was removed if it was found.
fn get_function<'a>(&'a self, name: &str) -> Option<&'a Box<Function>>
Gets a function by name from the runtime.
fn register_builtin_functions(&mut self)
Registers all of the builtin JMESPath functions with the runtime.