Trait Model

Source
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§

Source

type Math<'model>: Math where Self: 'model

Source

type DrawStorage<'model, S: Settings>: DrawStorage where Self: 'model

Required Methods§

Source

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>>

Source

fn math(&self) -> Result<Self::Math<'_>>

Source

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.

Implementors§