Skip to main content

RepairStrategy

Trait RepairStrategy 

Source
pub trait RepairStrategy:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &'static str;
    fn can_repair(&self, state: &ParseState, error: &str) -> bool;
    fn repair(
        &self,
        state: &mut ParseState,
        error: &str,
    ) -> Result<(), FuzzyJsonError>;
    fn priority(&self) -> u8;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn can_repair(&self, state: &ParseState, error: &str) -> bool

Source

fn repair( &self, state: &mut ParseState, error: &str, ) -> Result<(), FuzzyJsonError>

Source

fn priority(&self) -> u8

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§