From d210c2ffe065431df381d2710d3958c4a5fe6a06 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sat, 7 Sep 2019 14:22:00 -0400 Subject: structures --- src/main.rs | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e7a11a9..4405674 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,31 @@ +use serde::{Deserialize, Serialize}; + +const VERS: &str = "v0.1"; +const OUT_PATH: &str = "/var/www/htdocs/tilde.json"; + +#[derive(Debug, Deserialize, Serialize)] +struct Server { + name: String, + url: String, + signup_url: String, + user_count: u32, + want_users: bool, + admin_email: String, + description: String, + users: Vec, +} + +#[derive(Debug, Deserialize, Serialize)] +struct User { + name: String, + title: String, + mtime: String, +} + fn main() { - println!("Hello, world!"); + println!("instistats {}", VERS); + println!("(c) 2019 Ben Morrison - ISC License"); + println!(); + println!("Path: {}", OUT_PATH); + println!(); } -- cgit 1.4.1-2-gfad0