pub struct SecretStorage {
db: Arc<Database>,
}Fields§
§db: Arc<Database>Implementations§
Source§impl SecretStorage
impl SecretStorage
pub fn new(db: Arc<Database>) -> Result<Self>
pub fn set_secret( &self, key: &str, value: &str, description: Option<String>, ) -> Result<()>
pub fn create_secret( &self, key: &str, value: &str, description: Option<String>, ) -> Result<()>
pub fn update_secret( &self, key: &str, value: &str, description: Option<String>, ) -> Result<()>
fn get_secret_model(&self, key: &str) -> Result<Option<Secret>>
pub fn get_secret(&self, key: &str) -> Result<Option<String>>
pub fn delete_secret(&self, key: &str) -> Result<()>
pub fn list_secrets(&self) -> Result<Vec<Secret>>
pub fn has_secret(&self, key: &str) -> Result<bool>
Trait Implementations§
Source§impl Clone for SecretStorage
impl Clone for SecretStorage
Source§fn clone(&self) -> SecretStorage
fn clone(&self) -> SecretStorage
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 SecretStorage
impl !RefUnwindSafe for SecretStorage
impl Send for SecretStorage
impl Sync for SecretStorage
impl Unpin for SecretStorage
impl !UnwindSafe for SecretStorage
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