pub struct SecretManager { /* private fields */ }Expand description
Handles secret redaction and restoration across different tool types
Implementations§
Source§impl SecretManager
impl SecretManager
pub fn new(redact_secrets: bool, privacy_mode: bool) -> Self
Sourcepub fn load_session_redaction_map(&self) -> HashMap<String, String>
pub fn load_session_redaction_map(&self) -> HashMap<String, String>
Load the redaction map from the session file
Sourcepub fn save_session_redaction_map(
&self,
redaction_map: &HashMap<String, String>,
)
pub fn save_session_redaction_map( &self, redaction_map: &HashMap<String, String>, )
Save the redaction map to the session file
Sourcepub fn add_to_session_redaction_map(
&self,
new_redactions: &HashMap<String, String>,
)
pub fn add_to_session_redaction_map( &self, new_redactions: &HashMap<String, String>, )
Add new redactions to the session map
Sourcepub fn restore_secrets_in_string(&self, input: &str) -> String
pub fn restore_secrets_in_string(&self, input: &str) -> String
Restore secrets in a string using the session redaction map
Sourcepub fn redact_and_store_secrets(
&self,
content: &str,
path: Option<&str>,
) -> String
pub fn redact_and_store_secrets( &self, content: &str, path: Option<&str>, ) -> String
Redact secrets and add to session map
pub fn redact_and_store_password(&self, content: &str, password: &str) -> String
Trait Implementations§
Source§impl Clone for SecretManager
impl Clone for SecretManager
Source§fn clone(&self) -> SecretManager
fn clone(&self) -> SecretManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SecretManager
impl RefUnwindSafe for SecretManager
impl Send for SecretManager
impl Sync for SecretManager
impl Unpin for SecretManager
impl UnwindSafe for SecretManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more