pub trait Solver<M> {
type Params;
// Required methods
fn new(
start_time: f64,
tolerance: f64,
nx: usize,
nz: usize,
params: Self::Params,
) -> Self;
fn step(
&mut self,
model: &mut M,
next_time: f64,
) -> Result<(f64, bool), SolverError>;
fn reset(&mut self, model: &mut M, time: f64) -> Result<(), SolverError>;
}Required Associated Types§
Required Methods§
Sourcefn new(
start_time: f64,
tolerance: f64,
nx: usize,
nz: usize,
params: Self::Params,
) -> Self
fn new( start_time: f64, tolerance: f64, nx: usize, nz: usize, params: Self::Params, ) -> Self
Create a new Solver instance.
§Arguments
nx- The number of continuous states.nz- The number of event indicators.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.