ReductionFactory

Trait ReductionFactory 

Source
pub trait ReductionFactory {
    // Required methods
    fn parse_config(&self, value: &Value) -> Result<Box<dyn ReductionConfig>>;
    fn create(
        &self,
        config: &dyn ReductionConfig,
        global_config: &GlobalConfig,
        num_models_above: ModelIndex,
    ) -> Result<ReductionWrapper>;
    fn typename(&self) -> PascalCaseString;
    fn get_config_schema(&self) -> RootSchema;
    fn get_config_default(&self) -> Value;

    // Provided method
    fn get_suggested_metrics(&self) -> Vec<String> { ... }
}

Required Methods§

Source

fn parse_config(&self, value: &Value) -> Result<Box<dyn ReductionConfig>>

Source

fn create( &self, config: &dyn ReductionConfig, global_config: &GlobalConfig, num_models_above: ModelIndex, ) -> Result<ReductionWrapper>

Source

fn typename(&self) -> PascalCaseString

Source

fn get_config_schema(&self) -> RootSchema

Source

fn get_config_default(&self) -> Value

Provided Methods§

Implementors§