Skip to main content

BestSolutionCallback

Trait BestSolutionCallback 

Source
pub trait BestSolutionCallback<S>: Send + Sync {
    // Required method
    fn invoke(&self, solution: &S);
}
Expand description

Sealed trait for invoking an optional best-solution callback.

Implemented for () (no-op) and for any F: Fn(&S) + Send + Sync.

Required Methods§

Source

fn invoke(&self, solution: &S)

Invokes the callback with the given solution, if one is registered.

Implementations on Foreign Types§

Source§

impl<S> BestSolutionCallback<S> for ()

Source§

fn invoke(&self, _solution: &S)

Implementors§

Source§

impl<S, F: Fn(&S) + Send + Sync> BestSolutionCallback<S> for F