pub struct DatabaseManager { /* private fields */ }Expand description
Database manager for merka-vault
Implementations§
Source§impl DatabaseManager
impl DatabaseManager
Sourcepub fn new(db_path: &str) -> Result<Self, Error>
pub fn new(db_path: &str) -> Result<Self, Error>
Create a new database manager with the specified database file
Sourcepub fn save_vault_credentials(
&self,
credentials: &VaultCredentials,
) -> SQLiteResult<()>
pub fn save_vault_credentials( &self, credentials: &VaultCredentials, ) -> SQLiteResult<()>
Save vault credentials to the database
Sourcepub fn load_vault_credentials(&self) -> SQLiteResult<VaultCredentials>
pub fn load_vault_credentials(&self) -> SQLiteResult<VaultCredentials>
Load vault credentials from the database
Sourcepub fn save_unsealer_relationship(
&self,
sub_addr: &str,
root_addr: &str,
) -> SQLiteResult<()>
pub fn save_unsealer_relationship( &self, sub_addr: &str, root_addr: &str, ) -> SQLiteResult<()>
Save an unsealer relationship to the database
Sourcepub fn load_unsealer_relationships(
&self,
) -> SQLiteResult<HashMap<String, String>>
pub fn load_unsealer_relationships( &self, ) -> SQLiteResult<HashMap<String, String>>
Load all unsealer relationships from the database
Sourcepub fn delete_unsealer_relationship(&self, sub_addr: &str) -> SQLiteResult<()>
pub fn delete_unsealer_relationship(&self, sub_addr: &str) -> SQLiteResult<()>
Delete an unsealer relationship from the database
Trait Implementations§
Source§impl Clone for DatabaseManager
impl Clone for DatabaseManager
Source§fn clone(&self) -> DatabaseManager
fn clone(&self) -> DatabaseManager
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 DatabaseManager
impl !RefUnwindSafe for DatabaseManager
impl Send for DatabaseManager
impl Sync for DatabaseManager
impl Unpin for DatabaseManager
impl !UnwindSafe for DatabaseManager
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