[−][src]Struct jmespatch::Runtime
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]
pub fn new() -> Runtime
[src]
Creates a new Runtime.
pub fn compile<'a>(
&'a self,
expression: &str
) -> Result<Expression<'a>, JmespathError>
[src]
&'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
pub fn register_function(&mut self, name: &str, f: Box<dyn Function>)
[src]
Adds a new function to the runtime.
pub fn deregister_function(&mut self, name: &str) -> Option<Box<dyn Function>>
[src]
Removes a function from the runtime.
Returns the function that was removed if it was found.
pub fn get_function<'a>(&'a self, name: &str) -> Option<&'a dyn Function>
[src]
Gets a function by name from the runtime.
pub fn register_builtin_functions(&mut self)
[src]
Registers all of the builtin JMESPath functions with the runtime.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,