Skip to main content

SelectionHandler

Trait SelectionHandler 

pub trait SelectionHandler {
    // Required method
    fn handle_selection(
        &mut self,
        selector: usize,
        path: &ValuePath,
        token: Token<'_>,
    ) -> Result<(), JsonError>;
}
Expand description

Handles value tokens selected by one or more JSONPath expressions.

Required Methods§

fn handle_selection( &mut self, selector: usize, path: &ValuePath, token: Token<'_>, ) -> Result<(), JsonError>

Handles a selected value token.

selector is the index of the matching selector in registration order.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

§

impl<F> SelectionHandler for F
where F: FnMut(usize, &ValuePath, Token<'_>) -> Result<(), JsonError>,