Struct sim_by_fired_event::NothingEventSimulator[][src]

pub struct NothingEventSimulator<M, Rec> where
    M: NothingEventModel<Rec>, 
{ /* fields omitted */ }

simulator for Nothing event

Implementations

impl<M, Rec> NothingEventSimulator<M, Rec> where
    M: NothingEventModel<Rec>, 
[src]

pub fn new() -> Self where
    M: Default,
    Rec: Default
[src]

create as default

pub fn create_from(model: M, recorder: Rec) -> Self[src]

create simulator from model

pub fn get_model(&self) -> &M[src]

getter for model

pub fn get_recorder(&self) -> &Rec[src]

getter for recorder

pub fn get_recorder_as_mut(&mut self) -> &mut Rec[src]

getter for recorder

pub fn swap_recorder(&mut self, new_recorder: Rec) -> Rec[src]

swap new and old recorder with get old recorder.

pub fn run_step(&mut self)[src]

run simulate for one frame

pub fn run_n<FC: FrameCounter>(&mut self, counter: FC)[src]

run simulate for frames

pub fn run_until<F>(&mut self, can_continue: F) where
    F: Fn(&M) -> bool
[src]

run simulation until condition is true

pub fn run_with_state<F, P>(&mut self, update_state: F, can_continue: P) where
    F: Fn(&mut M),
    P: Fn(&M) -> bool
[src]

run simulation with update model’s state

Trait Implementations

impl<M: Clone, Rec: Clone> Clone for NothingEventSimulator<M, Rec> where
    M: NothingEventModel<Rec>, 
[src]

impl<M: Debug, Rec: Debug> Debug for NothingEventSimulator<M, Rec> where
    M: NothingEventModel<Rec>, 
[src]

Auto Trait Implementations

impl<M, Rec> RefUnwindSafe for NothingEventSimulator<M, Rec> where
    M: RefUnwindSafe,
    Rec: RefUnwindSafe

impl<M, Rec> Send for NothingEventSimulator<M, Rec> where
    M: Send,
    Rec: Send

impl<M, Rec> Sync for NothingEventSimulator<M, Rec> where
    M: Sync,
    Rec: Sync

impl<M, Rec> Unpin for NothingEventSimulator<M, Rec> where
    M: Unpin,
    Rec: Unpin

impl<M, Rec> UnwindSafe for NothingEventSimulator<M, Rec> where
    M: UnwindSafe,
    Rec: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,