pub trait Tokens: Send + Sync {
// Required methods
fn put(&self, key: &str, token: &str) -> Result<(), String>;
fn get(&self, key: &str) -> Result<String, String>;
fn delete(&self, key: &str) -> Result<(), String>;
}Expand description
Where peers’ tokens are kept: the secret store (the OS keychain) in the app; in memory in tests, which must not touch the user’s keychain.
Required Methods§
fn put(&self, key: &str, token: &str) -> Result<(), String>
fn get(&self, key: &str) -> Result<String, String>
fn delete(&self, key: &str) -> Result<(), String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".