Skip to main content

Query

Trait Query 

Source
pub trait Query {
    // Required method
    fn process_with_context<'a, T: Queryable>(
        &self,
        state: State<'a, T>,
        ctx: &mut JsonPathEvalContext,
    ) -> State<'a, T>;

    // Provided method
    fn process<'a, T: Queryable>(&self, state: State<'a, T>) -> State<'a, T> { ... }
}
Expand description

Main internal trait to implement the logic of processing jsonpath.

Required Methods§

Source

fn process_with_context<'a, T: Queryable>( &self, state: State<'a, T>, ctx: &mut JsonPathEvalContext, ) -> State<'a, T>

Processes the state, reusing what ctx keeps.

Provided Methods§

Source

fn process<'a, T: Queryable>(&self, state: State<'a, T>) -> State<'a, T>

Processes the state on its own, reusing nothing from one call to the next.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Query for Vec<Segment>

Source§

fn process_with_context<'a, T: Queryable>( &self, state: State<'a, T>, ctx: &mut JsonPathEvalContext, ) -> State<'a, T>

Source§

impl Query for Vec<SingularQuerySegment>

Source§

fn process_with_context<'a, T: Queryable>( &self, state: State<'a, T>, ctx: &mut JsonPathEvalContext, ) -> State<'a, T>

Implementors§