pub trait Model:
Send
+ Sync
+ 'static {
type Math<'model>: Math
where Self: 'model;
type DrawStorage<'model, S: Settings>: DrawStorage
where Self: 'model;
// Required methods
fn new_trace<'model, S: Settings, R: Rng + ?Sized>(
&'model self,
rng: &mut R,
chain_id: u64,
settings: &'model S,
) -> Result<Self::DrawStorage<'model, S>>;
fn math(&self) -> Result<Self::Math<'_>>;
fn init_position<R: Rng + ?Sized>(
&self,
rng: &mut R,
position: &mut [f64],
) -> Result<()>;
}
Required Associated Types§
type Math<'model>: Math where Self: 'model
type DrawStorage<'model, S: Settings>: DrawStorage where Self: 'model
Required Methods§
fn new_trace<'model, S: Settings, R: Rng + ?Sized>( &'model self, rng: &mut R, chain_id: u64, settings: &'model S, ) -> Result<Self::DrawStorage<'model, S>>
fn math(&self) -> Result<Self::Math<'_>>
fn init_position<R: Rng + ?Sized>( &self, rng: &mut R, position: &mut [f64], ) -> Result<()>
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.