Trait rsonpath_lib::engine::Compiler
source · pub trait Compiler {
type E<'q>: Engine + 'q;
// Required methods
fn compile_query(
query: &JsonPathQuery
) -> Result<Self::E<'_>, CompilerError>;
fn from_compiled_query(automaton: Automaton<'_>) -> Self::E<'_>;
}
Expand description
Trait for an engine that can be created by compiling a JsonPathQuery
.
Required Associated Types§
Required Methods§
sourcefn compile_query(query: &JsonPathQuery) -> Result<Self::E<'_>, CompilerError>
fn compile_query(query: &JsonPathQuery) -> Result<Self::E<'_>, CompilerError>
Compile a JsonPathQuery
into an Engine
.
Errors
An appropriate CompilerError
is returned if the compiler
cannot handle the query.