Struct rlifesrc_lib::World[][src]

pub struct World<'a, R: Rule, RE: Reason<'a, R>> { /* fields omitted */ }

The world.

Implementations

impl<'a, R: Rule, RE: Reason<'a, R>> World<'a, R, RE>[src]

pub fn search(&mut self, max_step: Option<u64>) -> Status[src]

The search function.

Returns Status::Found if a result is found, Status::None if such pattern does not exist, Status::Searching if the number of steps exceeds max_step and no results are found.

impl<'a, R: Rule> World<'a, R, ReasonNoBackjump>[src]

pub fn new_with_rule<RE: Reason<'a, R>>(
    config: &Config,
    rule: R
) -> World<'a, R, RE>
[src]

Creates a new world from the configuration and the rule.

pub fn new_no_backjump(config: &Config, rule: R) -> Self[src]

impl<'a, R: Rule> World<'a, R, ReasonBackjump<'a, R>>[src]

pub fn new_backjump(config: &Config, rule: R) -> Self[src]

impl<'a, R: Rule, RE: Reason<'a, R>> World<'a, R, RE>[src]

pub fn get_cell_state(&self, coord: Coord) -> Option<State>[src]

Gets the state of a cell. Returns Err(()) if there is no such cell.

impl<'a, R: Rule, RE: Reason<'a, R>> World<'a, R, RE>[src]

pub fn ser(&self) -> WorldSer[src]

Saves the world as a WorldSer.

Trait Implementations

The Search trait is implemented for every World.

Auto Trait Implementations

impl<'a, R, RE> !RefUnwindSafe for World<'a, R, RE>[src]

impl<'a, R, RE> !Send for World<'a, R, RE>[src]

impl<'a, R, RE> !Sync for World<'a, R, RE>[src]

impl<'a, R, RE> Unpin for World<'a, R, RE> where
    R: Unpin,
    RE: Unpin,
    <R as Rule>::Desc: Unpin
[src]

impl<'a, R, RE> !UnwindSafe for World<'a, R, RE>[src]

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