Adds vuejs with vue-cli, adds cors fairing to rocket
This commit is contained in:
@@ -11,16 +11,31 @@ use self::planner::solver::{Variables, Domain, Problem};
|
||||
/// Breakfast => RecipeCategory::Breakfast
|
||||
/// Lunch => RecipeCategory::MainCourse
|
||||
/// Dinner => RecipeCategory::MainCourse
|
||||
type Day = String;
|
||||
const DAYS: &[&str] = &["Lundi", "Mardi", "Mercredi"];
|
||||
|
||||
#[allow(dead_code)]
|
||||
enum Meals {
|
||||
Breakfast(Day),
|
||||
Lunch(Day),
|
||||
Dinner(Day)
|
||||
mod template {
|
||||
//! Exports the [`Template`] struct.
|
||||
|
||||
type Day = String;
|
||||
const DAYS: &[&str] = &["Lundi", "Mardi", "Mercredi"];
|
||||
|
||||
#[allow(dead_code)]
|
||||
enum Meals {
|
||||
Breakfast(Day),
|
||||
Lunch(Day),
|
||||
Dinner(Day)
|
||||
}
|
||||
|
||||
pub struct Template;
|
||||
|
||||
impl Template {
|
||||
fn empty() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
impl Into<String> for Meals {
|
||||
fn into(self) -> String {
|
||||
match self {
|
||||
|
||||
@@ -18,7 +18,7 @@ type Domains<'a, V> = HashMap<String, &'a Domain<V>>;
|
||||
/// The domain of values that can be assigned to variables
|
||||
#[derive(Clone)]
|
||||
pub struct Domain<V> {
|
||||
pub values: Vec<V>
|
||||
values: Vec<V>
|
||||
}
|
||||
|
||||
impl<V> Domain<V> {
|
||||
@@ -26,6 +26,9 @@ impl<V> Domain<V> {
|
||||
Domain { values }
|
||||
}
|
||||
|
||||
pub fn values(&self) -> &Vec<V> {
|
||||
&self.values
|
||||
}
|
||||
/// Returns a new domain with the given filter applied to inner values
|
||||
///
|
||||
/// # Examples
|
||||
|
||||
Reference in New Issue
Block a user