decouples meals generation
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
//! # Solver
|
||||
//!
|
||||
//! Provides `Variables`, `Domain` structs and `solve_all` function.
|
||||
use std::fmt;
|
||||
use std::clone::Clone;
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// An assignments map of variables
|
||||
pub type Variables<'a, V> = HashMap<String, Option<&'a V>>;
|
||||
|
||||
enum Assignment<'a, V> {
|
||||
@@ -10,6 +14,7 @@ enum Assignment<'a, V> {
|
||||
}
|
||||
|
||||
|
||||
/// The domain of values that can be assigned to variables
|
||||
#[derive(Clone)]
|
||||
pub struct Domain<V> {
|
||||
values: Vec<V>
|
||||
|
||||
Reference in New Issue
Block a user