Struct wfc::RunBorrow[][src]

pub struct RunBorrow<'a, W: Wrap = WrapXY, F: ForbidPattern = ForbidNothing> { /* fields omitted */ }

Represents a running instance of wfc which borrows its resources, making it possible to re-use memory across multiple runs.

Implementations

impl<'a> RunBorrow<'a>[src]

pub fn new<R: Rng>(
    context: &'a mut Context,
    wave: &'a mut Wave,
    global_stats: &'a GlobalStats,
    rng: &mut R
) -> Self
[src]

impl<'a, W: Wrap> RunBorrow<'a, W>[src]

pub fn new_wrap<R: Rng>(
    context: &'a mut Context,
    wave: &'a mut Wave,
    global_stats: &'a GlobalStats,
    wrap: W,
    rng: &mut R
) -> Self
[src]

impl<'a, F: ForbidPattern> RunBorrow<'a, WrapXY, F>[src]

pub fn new_forbid<R: Rng>(
    context: &'a mut Context,
    wave: &'a mut Wave,
    global_stats: &'a GlobalStats,
    forbid: F,
    rng: &mut R
) -> Self
[src]

impl<'a, W: Wrap, F: ForbidPattern> RunBorrow<'a, W, F>[src]

pub fn new_wrap_forbid<R: Rng>(
    context: &'a mut Context,
    wave: &'a mut Wave,
    global_stats: &'a GlobalStats,
    wrap: W,
    forbid: F,
    rng: &mut R
) -> Self
[src]

impl<'a, W: Wrap, F: ForbidPattern> RunBorrow<'a, W, F>[src]

pub fn reset<R: Rng>(&mut self, rng: &mut R)[src]

pub fn step<R: Rng>(&mut self, rng: &mut R) -> Result<Observe, PropagateError>[src]

pub fn collapse<R: Rng>(&mut self, rng: &mut R) -> Result<(), PropagateError>[src]

pub fn wave_cell_ref(&self, coord: Coord) -> WaveCellRef<'_>[src]

pub fn wave_cell_ref_iter(&self) -> impl Iterator<Item = WaveCellRef<'_>>[src]

pub fn wave_cell_ref_enumerate(
    &self
) -> impl Iterator<Item = (Coord, WaveCellRef<'_>)>
[src]

pub fn collapse_retrying<R, RB>(&mut self, retry: RB, rng: &mut R) -> RB::Return where
    R: Rng,
    RB: RetryBorrow
[src]

Auto Trait Implementations

impl<'a, W, F> RefUnwindSafe for RunBorrow<'a, W, F> where
    F: RefUnwindSafe,
    W: RefUnwindSafe
[src]

impl<'a, W, F> Send for RunBorrow<'a, W, F> where
    F: Send
[src]

impl<'a, W, F> Sync for RunBorrow<'a, W, F> where
    F: Sync
[src]

impl<'a, W, F> Unpin for RunBorrow<'a, W, F> where
    F: Unpin,
    W: Unpin
[src]

impl<'a, W = WrapXY, F = ForbidNothing> !UnwindSafe for RunBorrow<'a, W, F>[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>,