pub trait Compiler {
type E: Engine;
// Required methods
fn compile_query(query: &JsonPathQuery) -> Result<Self::E, CompilerError>;
fn from_compiled_query(automaton: Automaton) -> Self::E;
}Expand description
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.c
§Errors
An appropriate CompilerError is returned if the compiler
cannot handle the query.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.