pub struct DB {
pub file_name: String,
/* private fields */
}Fields§
§file_name: StringImplementations§
Source§impl DB
impl DB
pub fn new( file_name: String, backup_dir: String, store_pwd: Option<String>, salt: Option<String>, ) -> DB
pub fn init( file_name: String, backup_dir: String, store_pwd: Option<String>, salt: Option<String>, ) -> Result<()>
pub fn open(&mut self) -> Result<()>
pub fn backup_dir(&self) -> String
pub fn close(&self) -> Result<()>
pub fn collect_decrypted(&self) -> Result<Vec<DecryptedRecord>, Error>
pub fn delete(&self, key: String) -> Option<bool>
pub fn enabled(&self) -> bool
pub fn get(&self, key: String) -> Option<DecryptedRecord>
pub fn get_metadata(&self, key: String) -> Option<Metadata>
pub fn hash_map(&self) -> HashMap
pub fn insert(&self, record: DecryptedRecord) -> Result<Option<EncryptedRecord>>
pub fn iter(&self) -> Iter<'_, String, EncryptedRecord>
pub fn file_name(&self) -> String
pub fn salt(&self) -> String
pub fn store_pwd(&self) -> String
pub fn update(&self, key: String, updated: DecryptedRecord) -> Result<()>
pub fn update_metadata(&self, key: String, metadata: Metadata) -> Result<()>
pub fn version(&self) -> SemVer
pub fn schema_version(&self) -> SemVer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DB
impl !RefUnwindSafe for DB
impl !Send for DB
impl !Sync for DB
impl Unpin for DB
impl !UnwindSafe for DB
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more