pub trait SecretTarget {
// Required methods
fn get_secret(&self, key: &str) -> Option<&str>;
fn insert_secret(&mut self, key: &str, value: &str);
fn remove_secret(&mut self, key: &str);
}Expand description
The Secret trait defines methods for managing secret data associated with a Target struct.
Required Methods§
Sourcefn get_secret(&self, key: &str) -> Option<&str>
fn get_secret(&self, key: &str) -> Option<&str>
Sourcefn insert_secret(&mut self, key: &str, value: &str)
fn insert_secret(&mut self, key: &str, value: &str)
Inserts a new key-value pair into the secrets.
§Parameters
key: A string slice representing the key.value: A string slice representing the value.
Sourcefn remove_secret(&mut self, key: &str)
fn remove_secret(&mut self, key: &str)
Removes the key-value pair associated with the given key.
§Parameters
key: A string slice representing the key.