pub struct SimulationKernel<B, L>where
B: ComputeBackend,
L: LedgerSink,{ /* private fields */ }Implementations§
Source§impl<B, L> SimulationKernel<B, L>where
B: ComputeBackend,
L: LedgerSink,
impl<B, L> SimulationKernel<B, L>where
B: ComputeBackend,
L: LedgerSink,
Sourcepub fn new(
timestep: Duration,
config: DiffusionConfig,
backend: B,
ledger: L,
) -> (Self, Receiver<SimulationSnapshot>, Sender<RuntimeCommand>)
pub fn new( timestep: Duration, config: DiffusionConfig, backend: B, ledger: L, ) -> (Self, Receiver<SimulationSnapshot>, Sender<RuntimeCommand>)
Creates a new instance.
Sourcepub fn advance_elapsed(
&mut self,
elapsed: Duration,
) -> Result<usize, RuntimeError>
pub fn advance_elapsed( &mut self, elapsed: Duration, ) -> Result<usize, RuntimeError>
Advances by elapsed time.
Sourcepub fn latest_snapshot(&self) -> Option<&SimulationSnapshot>
pub fn latest_snapshot(&self) -> Option<&SimulationSnapshot>
Latest snapshot.
Sourcepub fn field(&self) -> DiffusionField
pub fn field(&self) -> DiffusionField
Field.
Shared frames.
Auto Trait Implementations§
impl<B, L> Freeze for SimulationKernel<B, L>
impl<B, L> RefUnwindSafe for SimulationKernel<B, L>where
B: RefUnwindSafe,
L: RefUnwindSafe,
impl<B, L> Send for SimulationKernel<B, L>where
B: Send,
impl<B, L> Sync for SimulationKernel<B, L>where
B: Sync,
impl<B, L> Unpin for SimulationKernel<B, L>
impl<B, L> UnsafeUnpin for SimulationKernel<B, L>where
B: UnsafeUnpin,
L: UnsafeUnpin,
impl<B, L> UnwindSafe for SimulationKernel<B, L>where
B: UnwindSafe,
L: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more