pub struct Problem<Var, Value> {
pub constraints: Vec<Box<dyn Constraint<Var, Value>>>,
pub range: HashSet<Var, BuildHasherDefault<FxHasher>>,
}Expand description
A constraint satisfaction problem consisting of constraints and a range of variables to solve for. The problem is considered solved when all variables in the range are assigned.
Fields§
§constraints: Vec<Box<dyn Constraint<Var, Value>>>The list of constraints that must be satisfied
range: HashSet<Var, BuildHasherDefault<FxHasher>>The set of variables that must be assigned a value for the problem to be considered solved
Trait Implementations§
Auto Trait Implementations§
impl<Var, Value> Freeze for Problem<Var, Value>
impl<Var, Value> !RefUnwindSafe for Problem<Var, Value>
impl<Var, Value> !Send for Problem<Var, Value>
impl<Var, Value> !Sync for Problem<Var, Value>
impl<Var, Value> Unpin for Problem<Var, Value>where
Var: Unpin,
impl<Var, Value> !UnwindSafe for Problem<Var, Value>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more