Adds vuejs with vue-cli, adds cors fairing to rocket

This commit is contained in:
2019-02-05 21:34:54 +01:00
parent bcc0564f2a
commit f220c6c960
16 changed files with 313 additions and 12 deletions

View File

@@ -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 {

View File

@@ -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