Trait rsonpath_lib::engine::Runner
source · pub trait Runner {
fn run<R: QueryResult>(&self, input: &Input) -> Result<R, EngineError>;
}
Expand description
Trait for an engine that can run its query on a given input.
Required Methods§
sourcefn run<R: QueryResult>(&self, input: &Input) -> Result<R, EngineError>
fn run<R: QueryResult>(&self, input: &Input) -> Result<R, EngineError>
Compute the QueryResult
on given Input
.
Errors
An appropriate EngineError
is returned if the JSON input is malformed
and the syntax error is detected.
Please note that detecting malformed JSONs is not guaranteed. Some glaring errors like mismatched braces or double quotes are raised, but in general the result of an engine run on an invalid JSON is undefined.