pub trait Reason<R: Rule> {
    const KNOWN: Self;
    const DECIDED: Self;

    // Required methods
    fn from_cell(cell: CellRef<R>) -> Self;
    fn from_sym(cell: CellRef<R>) -> Self;
    fn is_decided(&self) -> bool;
    fn ser(&self) -> ReasonSer;
}
Expand description

Reasons for setting a cell.

Required Associated Constants§

source

const KNOWN: Self

Known before the search starts,

source

const DECIDED: Self

Decides the state of a cell by choice.

Required Methods§

source

fn from_cell(cell: CellRef<R>) -> Self

Deduced from the rule when constitifying another cell.

source

fn from_sym(cell: CellRef<R>) -> Self

Deduced from symmetry.

source

fn is_decided(&self) -> bool

Decided or trying another state for generations rules.

source

fn ser(&self) -> ReasonSer

Available on crate feature serde only.

Saves the reason as a ReasonSer.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<R: Rule> Reason<R> for rlifesrc_lib::search::backjump::Reason<R>

source§

const KNOWN: Self = Self::Known

source§

const DECIDED: Self = Self::Decide

source§

impl<R: Rule> Reason<R> for rlifesrc_lib::search::lifesrc::Reason

source§

const KNOWN: Self = Self::Known

source§

const DECIDED: Self = Self::Decide