diff options
| author | Teddy Wing | 2018-08-08 05:30:21 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-08-08 05:30:21 +0200 |
| commit | 20ed9e16aeda341d172fbbaa4fc17e4364119445 (patch) | |
| tree | 02cbf439c2155c11763995c25ca31f480df2a615 /src | |
| parent | bf859c8d4380f5ba364316eb0bb31e807d1c8522 (diff) | |
| download | dome-key-map-20ed9e16aeda341d172fbbaa4fc17e4364119445.tar.bz2 | |
Add some types to use for storing the parsed result
Imagining how the data should be stored after parsing the map file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,21 @@ +extern crate combine; + +use std::collections::HashMap; + +type Trigger = String; +type Action = String; + +pub struct Map { + pub trigger: Trigger, + pub action: Action, + pub kind: String, +} + +pub struct DKMapGroup { + maps: HashMap<Trigger, Action>, + modes: HashMap<Trigger, Map>, +} + #[cfg(test)] mod tests { #[test] |
