use std::sync::Arc; pub type VaultRef = Arc; #[derive(Debug, Clone, PartialEq)] pub struct Vault { secret: String, } impl Vault { pub fn new(secret: &str) -> VaultRef { let v = Self { secret: secret.to_string(), }; Arc::new(v) } pub fn secret(&self) -> &str { &self.secret } }