pub trait ControlCtx {
type L: Logger;
type P: Propagator;
type O: GroundProgramObserver;
type F: FunctionHandler;
// Required methods
fn logger(&mut self) -> (&mut Self::L, u32);
fn propagator(&mut self) -> (&mut Self::P, bool);
fn observer(&mut self) -> (&mut Self::O, bool);
fn function_handler(&mut self) -> &mut Self::F;
}Expand description
An instance of this trait can be registered with a control object to enable logging, custom propagation, observers and function handling.
Required Associated Types§
type L: Logger
type P: Propagator
type O: GroundProgramObserver
type F: FunctionHandler
Required Methods§
Sourcefn logger(&mut self) -> (&mut Self::L, u32)
fn logger(&mut self) -> (&mut Self::L, u32)
Return a logger and the maximum number of times the logger callback is called
Sourcefn propagator(&mut self) -> (&mut Self::P, bool)
fn propagator(&mut self) -> (&mut Self::P, bool)
Return a propagator and boolean flag sequential
If the sequential flag is true, the propagator is called sequentially when solving with multiple threads.
Sourcefn observer(&mut self) -> (&mut Self::O, bool)
fn observer(&mut self) -> (&mut Self::O, bool)
Return a program observer and boolean flag for replace
If the replace flag is true, the grounding is passed to the observer but not the solver
Sourcefn function_handler(&mut self) -> &mut Self::F
fn function_handler(&mut self) -> &mut Self::F
Return a function handler