pub trait ContentTypeHandler<T> {
    fn process_body(
        &mut self,
        generators: &HashMap<DocPath, Generator>,
        mode: &GeneratorTestMode,
        context: &HashMap<&str, Value>,
        matcher: &Box<dyn VariantMatcher + Send + Sync>
    ) -> Result<OptionalBody, String>; fn apply_key(
        &mut self,
        key: &DocPath,
        generator: &dyn GenerateValue<T>,
        context: &HashMap<&str, Value>,
        matcher: &Box<dyn VariantMatcher + Send + Sync>
    ); }
Expand description

Trait to define a handler for applying generators to data of a particular content type.

Required Methods

Processes the body using the map of generators, returning a (possibly) updated body.

Applies the generator to the key in the body.

Implementors