configreader.rs 734 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


//#[cfg(feature = "preserve_order")]
//pub type Map<K, V> = linked_hash_map::LinkedHashMap<K, V>;

extern crate linked-hash-map;

use linked_hash_map::LinkedHashMap

#[derive(Serialize, Deserialize)]
struct TaskgroupJson {
    location: String,
    stars: Option<u8>,
}

#[derive(Serialize, Deserialize)]
struct TaskgroupJson {
    name: String,
    location: Option<String>,
    variants: Option<Vec<Task>>,
    locations: Option<Vec<String>>,
}


#[derive(Serialize, Deserialize)]
struct ContestJson {
    name: String,
    participation_start: Option<DateTime<Utc>>,
    participation_end: Option<DateTime<Utc>>,
    duration_minutes: u32,
    public_listing: Option<bool>,
    tasks: LinkedHashMap<String, serde_json::Value>,
}