Skip to main content

Solvable

Trait Solvable 

Source
pub trait Solvable:
    PlanningSolution
    + Send
    + 'static {
    // Required method
    fn solve(
        self,
        terminate: Option<&AtomicBool>,
        sender: UnboundedSender<(Self, Self::Score)>,
    );
}
Expand description

Trait for solutions that can be solved with channel-based solution streaming.

This trait is implemented by the #[planning_solution] macro when constraints is specified. The solver sends owned solutions through the channel - no Clone required.

Solver progress is logged via tracing at INFO/DEBUG levels.

§Type Parameters

The solution must be Send + 'static to support async job execution. Note: Clone is NOT required - ownership is transferred via channel.

Required Methods§

Source

fn solve( self, terminate: Option<&AtomicBool>, sender: UnboundedSender<(Self, Self::Score)>, )

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§