pub trait ExperimentRendering {
    type ExperimentContext: Send;
    type ExperimentEnvironment: Send;
    fn prepare(
        &self,
        experiment: &Experiment
    ) -> Result<Self::ExperimentEnvironment>;
fn render(
        &self,
        experiment: &Experiment,
        reporters: &Vec<Box<dyn ExperimentReporter<Self> + Sync + Send>>,
        env: &Self::ExperimentEnvironment
    ) -> Result<()>
    where
        Self: Sized
;
fn on_completed(
        &self,
        experiment: &Experiment,
        env: &Self::ExperimentEnvironment
    ) -> Result<()>;
fn on_failed(
        &self,
        experiment: &Experiment,
        env: &Self::ExperimentEnvironment,
        err: &Error
    ) -> Result<()>; }
Expand description

It allows rendering the simulation results in an arbitrary way.

Associated Types

Defines a context used when rendering the experiment.

Defines the experiment environment.

Required methods

Prepare before rendering the experiment.

Render the experiment after the simulation is finished, example, create the index.html file in the specified directory.

It is called when the experiment has been completed.

It is called when the experiment has been failed.

Implementors