Skip to main content

JsonValueHandler

Trait JsonValueHandler 

pub trait JsonValueHandler {
    // Required method
    fn handle_value(
        &mut self,
        selector: usize,
        value: &mut JsonValue<'_>,
    ) -> Result<(), JsonError>;
}
Expand description

Handles a selected JSON value.

Required Methods§

fn handle_value( &mut self, selector: usize, value: &mut JsonValue<'_>, ) -> Result<(), JsonError>

Handles one selected value.

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 JsonValueHandler for JsonHandlers<'_>

§

impl<F> JsonValueHandler for F
where F: FnMut(usize, &mut JsonValue<'_>) -> Result<(), JsonError>,