BasicDriver

Struct BasicDriver 

Source
pub struct BasicDriver<C: CellState, E: EntityState<C>, M: MutEntityState, CA: CellAction<C>, EA: EntityAction<C, E>, N: Engine<C, E, M, CA, EA>> { /* private fields */ }
Expand description

Simplest implementation of a Driver. Starts an infinite loop that steps the simulation’s engine forever.

Implementations§

Source§

impl<C: CellState, E: EntityState<C>, M: MutEntityState, CA: CellAction<C>, EA: EntityAction<C, E>, N: Engine<C, E, M, CA, EA>> BasicDriver<C, E, M, CA, EA, N>

Source

pub fn new() -> BasicDriver<C, E, M, CA, EA, N>

Trait Implementations§

Source§

impl<C: CellState, E: EntityState<C>, M: MutEntityState, CA: CellAction<C>, EA: EntityAction<C, E>, N: Engine<C, E, M, CA, EA>> Driver<C, E, M, CA, EA, N> for BasicDriver<C, E, M, CA, EA, N>

Source§

fn init( self, universe: Universe<C, E, M, CA, EA>, engine: N, middleware: &mut [Box<dyn Middleware<C, E, M, CA, EA, N>>], )

Auto Trait Implementations§

§

impl<C, E, M, CA, EA, N> Freeze for BasicDriver<C, E, M, CA, EA, N>

§

impl<C, E, M, CA, EA, N> RefUnwindSafe for BasicDriver<C, E, M, CA, EA, N>

§

impl<C, E, M, CA, EA, N> Send for BasicDriver<C, E, M, CA, EA, N>
where C: Send, E: Send, M: Send, CA: Send, EA: Send, N: Send,

§

impl<C, E, M, CA, EA, N> Sync for BasicDriver<C, E, M, CA, EA, N>
where C: Sync, E: Sync, M: Sync, CA: Sync, EA: Sync, N: Sync,

§

impl<C, E, M, CA, EA, N> Unpin for BasicDriver<C, E, M, CA, EA, N>
where C: Unpin, E: Unpin, M: Unpin, CA: Unpin, EA: Unpin, N: Unpin,

§

impl<C, E, M, CA, EA, N> UnwindSafe for BasicDriver<C, E, M, CA, EA, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.