aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs
index 6ee2d17..22f37b6 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,5 +1,7 @@
use getopts::Options;
+type Milliseconds = u16;
+
#[repr(C)]
#[derive(Default)]
struct Args {
@@ -8,9 +10,20 @@ struct Args {
}
#[repr(C)]
-#[derive(Default)]
+#[derive(Deserialize)]
pub struct Config {
+ #[serde(skip)]
args: Args,
+ timeout: Milliseconds,
+}
+
+impl Default for Config {
+ fn default() -> Self {
+ Config {
+ args: Args::default(),
+ timeout: 500,
+ }
+ }
}
fn print_usage(opts: Options) {