pub trait Scenario: Sync {
type State: Sync;
// Required methods
fn name(&self) -> &str;
fn setup(&self, condition: &Condition) -> Result<Self::State>;
fn trial(
&self,
state: &Self::State,
condition: &Condition,
rng: &mut Rng,
record: &mut Record,
) -> Result<()>;
}Expand description
One random trial of a link, evaluated under many conditions.
Required Associated Types§
Sourcetype State: Sync
type State: Sync
The per-condition state built by Scenario::setup and shared by the trials.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
The name of the scenario (it enters the seeds of the trials and the reports).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".