Skip to main content

ProblemSolution

Trait ProblemSolution 

Source
pub trait ProblemSolution {
    // Required methods
    fn num_domains(&self) -> usize;
    fn get_integer_value<Var>(&self, var: Var) -> i32
       where Var: IntegerVariable;
    fn get_literal_value(&self, literal: Literal) -> bool;
}
Expand description

A trait which specifies the common behaviours of Solution and SolutionReference.

Required Methods§

Source

fn num_domains(&self) -> usize

Returns the number of defined DomainIds.

Source

fn get_integer_value<Var>(&self, var: Var) -> i32
where Var: IntegerVariable,

Source

fn get_literal_value(&self, literal: Literal) -> bool

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<T> ProblemSolution for T
where T: HasAssignments,