use serde::{Deserialize, Serialize}; pub const DEFAULT_SOCKET: &str = "/run/pass-broker.sock"; /// One JSON line from the client. #[derive(Serialize, Deserialize)] pub struct Request { pub vault: Option, pub item: String, pub field: String, pub reason: String, } /// JSON lines from the daemon: any number of `Pending`, then one final reply. #[derive(Serialize, Deserialize)] #[serde(tag = "status", rename_all = "snake_case")] pub enum Reply { Pending { message: String }, Ok { value: String }, Error { error: String }, }