pub trait Simulator: Installation + Any + Send + Sync {
    type Schema: Schema;
    type Input;
    type Options;
    type Output;
    type Error;

    // Required method
    fn simulate_inputs(
        &self,
        ctx: &SimulationContext<Self>,
        options: Self::Options,
        input: Vec<Self::Input>
    ) -> Result<Vec<Self::Output>, Self::Error>;

    // Provided method
    fn simulate<A>(
        &self,
        ctx: &SimulationContext<Self>,
        options: Self::Options,
        input: A
    ) -> Result<A::Output, Self::Error>
       where A: SupportedBy<Self>,
             Self: Sized { ... }
}
Expand description

A circuit simulator.

Required Associated Types§

source

type Schema: Schema

The schema that this simulator uses.

source

type Input

The input type this simulator accepts.

source

type Options

Options shared across all analyses for a given simulator run.

source

type Output

The output type produced by this simulator.

source

type Error

The error type returned by the simulator.

Required Methods§

source

fn simulate_inputs( &self, ctx: &SimulationContext<Self>, options: Self::Options, input: Vec<Self::Input> ) -> Result<Vec<Self::Output>, Self::Error>

Simulates the given set of analyses.

Provided Methods§

source

fn simulate<A>( &self, ctx: &SimulationContext<Self>, options: Self::Options, input: A ) -> Result<A::Output, Self::Error>
where A: SupportedBy<Self>, Self: Sized,

Simulates the given, possibly composite, analysis.

Object Safety§

This trait is not object safe.

Implementors§