pub enum Reason<R: Rule> {
    Known,
    Decide,
    Rule(CellRef<R>),
    Sym(CellRef<R>),
    Deduce,
    Clause(Vec<CellRef<R>>),
}
Expand description

Reasons for setting a cell, with informations for backjumping.

Variants§

§

Known

Known before the search starts,

§

Decide

Decides the state of a cell by choice.

§

Rule(CellRef<R>)

Deduced from the rule when constitifying another cell.

§

Sym(CellRef<R>)

Deduced from symmetry.

§

Deduce

Deduced from other cells or conflicts.

A general reason used as a fallback.

§

Clause(Vec<CellRef<R>>)

Deduced from a learnt clause.

Implementations§

source§

impl<R: Rule> Reason<R>

source

fn cells(self) -> Vec<CellRef<R>>

Cells involved in the reason.

Trait Implementations§

source§

impl<R: Rule> Clone for Reason<R>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, _source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R: Rule> Debug for Reason<R>

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R: Rule> PartialEq for Reason<R>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R: Rule> Reason<R> for Reason<R>

source§

const KNOWN: Self = Self::Known

Known before the search starts,
source§

const DECIDED: Self = Self::Decide

Decides the state of a cell by choice.
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.
source§

impl<R: Rule> Eq for Reason<R>

Auto Trait Implementations§

§

impl<R> !RefUnwindSafe for Reason<R>

§

impl<R> !Send for Reason<R>

§

impl<R> !Sync for Reason<R>

§

impl<R> Unpin for Reason<R>

§

impl<R> !UnwindSafe for Reason<R>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V