Trait Algorithm

Source
pub trait Algorithm<R: Rule>: Sealed {
    // Required methods
    fn new() -> Self;
    fn deser_reason(
        world: &World<R, Self>,
        ser: &ReasonSer,
    ) -> Result<Self::Reason, Error>;
}
Expand description

The search algorithms.

Currently only two algorithms are supported:

  • LifeSrc: The default algorithm based on David Bell’s lifesrc.
  • Backjump: (Experimental) Adding Backjumping to the original lifesrc algorithm. Very slow. Do not use it.

This trait is sealed and cannot be implemented outside of this crate. Most of its items are hidden in the doc.

Required Methods§

Source

fn new() -> Self

Generate new algorithm data.

Source

fn deser_reason( world: &World<R, Self>, ser: &ReasonSer, ) -> Result<Self::Reason, Error>

Available on crate feature serde only.

Restore the reason from a ReasonSer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: Rule> Algorithm<R> for LifeSrc

Source§

impl<R: Rule<IsGen = False>> Algorithm<R> for Backjump<R>