pub trait PhysicsSimulation: Send + Sync {
// Required methods
fn simulation_type(&self) -> &str;
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 SimulationParameters,
) -> Pin<Box<dyn Future<Output = PhysicsResult<SimulationResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn validate_results(&self, result: &SimulationResult) -> PhysicsResult<()>;
}Expand description
Trait for physics simulations (SciRS2 integration)
Required Methods§
Sourcefn simulation_type(&self) -> &str
fn simulation_type(&self) -> &str
Get simulation type name
Sourcefn run<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 SimulationParameters,
) -> Pin<Box<dyn Future<Output = PhysicsResult<SimulationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 SimulationParameters,
) -> Pin<Box<dyn Future<Output = PhysicsResult<SimulationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run the simulation
Sourcefn validate_results(&self, result: &SimulationResult) -> PhysicsResult<()>
fn validate_results(&self, result: &SimulationResult) -> PhysicsResult<()>
Validate results against physics constraints