[][src]Struct gridsim_ui::Loop

pub struct Loop<'a, S> where
    S: Sim<'a>, 
{ /* fields omitted */ }

Methods

impl<'a, S> Loop<'a, S> where
    S: Sim<'a>, 
[src]

pub fn new<C>(coloration: C) -> Self where
    C: Fn(&S::Cell) -> [f32; 3] + Sync + 'static, 
[src]

Must pass the function that colors cells. Color is in RGB ([red, green, blue]).

pub fn new_bool() -> Self where
    S: Sim<'a, Cell = bool>, 
[src]

pub fn scale(&mut self, scale: f32) -> &mut Self[src]

pub fn filter<F>(&mut self, filter: F) -> &mut Self where
    F: Fn(&S::Cell) -> bool + Sync + 'static, 
[src]

pub fn run(&self, grid: SquareGrid<'a, S>) where
    S: 'a,
    S::Cell: Sync + Send,
    S::Move: Sync + Send,
    S::Diff: Sync + Send,
    S::Neighbors: Sync + Send,
    S::MoveNeighbors: Sync + Send,
    SquareGrid<'a, S>: TakeMoveNeighbors<usize, S::MoveNeighbors>,
    SquareGrid<'a, S>: GetNeighbors<'a, usize, S::Neighbors>, 
[src]

pub unsafe fn run_multi<I0: Read, I1: Read, I2: Read, I3: Read, I4: Read, I5: Read, I6: Read, I7: Read, O0: Write, O1: Write, O2: Write, O3: Write, O4: Write, O5: Write, O6: Write, O7: Write>(
    &self,
    grid: SquareGrid<'a, S>,
    in_right: I0,
    in_up_right: I1,
    in_up: I2,
    in_up_left: I3,
    in_left: I4,
    in_down_left: I5,
    in_down: I6,
    in_down_right: I7,
    out_right: O0,
    out_up_right: O1,
    out_up: O2,
    out_up_left: O3,
    out_left: O4,
    out_down_left: O5,
    out_down: O6,
    out_down_right: O7
) where
    S: 'a,
    S::Cell: Sync + Send + Serialize + Deserialize<'dc>,
    S::Move: Sync + Send,
    S::Diff: Sync + Send,
    S::Neighbors: Sync + Send,
    S::MoveNeighbors: Sync + Send,
    SquareGrid<'a, S>: TakeMoveNeighbors<usize, S::MoveNeighbors>,
    SquareGrid<'a, S>: GetNeighbors<'a, usize, S::Neighbors>, 
[src]

Runs serializing and deserializing to and from another run_multi. As soon as any read or write fails this will terminate without prompting.

Make sure the reads and writes are only connected to other SquareGrid::run_multi running on any machine using THE EXACT SAME simulation or else there may be undefined behavior.

Auto Trait Implementations

impl<'a, S> Unpin for Loop<'a, S>

impl<'a, S> Sync for Loop<'a, S>

impl<'a, S> !Send for Loop<'a, S>

impl<'a, S> !RefUnwindSafe for Loop<'a, S>

impl<'a, S> !UnwindSafe for Loop<'a, S>

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T