pub struct MainEngine<'q> { /* private fields */ }
Expand description

Main engine for a fixed JSONPath query.

The engine is stateless, meaning that it can be executed on any number of separate inputs, even on separate threads.

Trait Implementations§

source§

impl Compiler for MainEngine<'_>

§

type E<'q> = MainEngine<'q>

Concrete type of the Engines created, parameterized with the lifetime of the input query.
source§

fn compile_query(query: &JsonPathQuery) -> Result<MainEngine<'_>, CompilerError>

Compile a JsonPathQuery into an Engine.c Read more
source§

fn from_compiled_query(automaton: Automaton<'_>) -> Self::E<'_>

Turn a compiled Automaton into an Engine.
source§

impl Engine for MainEngine<'_>

source§

fn count<I>(&self, input: &I) -> Result<MatchCount, EngineError>
where I: Input,

Find the number of matches on the given Input. Read more
source§

fn indices<I, S>(&self, input: &I, sink: &mut S) -> Result<(), EngineError>
where I: Input, S: Sink<MatchIndex>,

Find the starting indices of matches on the given Input and write them to the Sink. Read more
source§

fn approximate_spans<I, S>( &self, input: &I, sink: &mut S ) -> Result<(), EngineError>
where I: Input, S: Sink<MatchSpan>,

Find the approximate spans of matches on the given Input and write them to the Sink. Read more
source§

fn matches<I, S>(&self, input: &I, sink: &mut S) -> Result<(), EngineError>
where I: Input, S: Sink<Match>,

Find all matches on the given Input and write them to the Sink. Read more

Auto Trait Implementations§

§

impl<'q> Freeze for MainEngine<'q>

§

impl<'q> RefUnwindSafe for MainEngine<'q>

§

impl<'q> Send for MainEngine<'q>

§

impl<'q> Sync for MainEngine<'q>

§

impl<'q> Unpin for MainEngine<'q>

§

impl<'q> UnwindSafe for MainEngine<'q>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.