1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#[derive(serde::Serialize, serde::Deserialize, Debug)] pub struct Message { pub tty: Option<String>, pub action: Action, } #[derive(serde::Serialize, serde::Deserialize, Debug)] #[serde(tag = "type")] pub enum Action { Login, Unlock, Sync, Decrypt { cipherstring: String }, // add // update // remove }