pub struct EncryptedDB { /* private fields */ }Implementations§
Source§impl EncryptedDB
impl EncryptedDB
pub fn from_decrypted( decrypted: Vec<u8>, path: String, pwd: String, salt: String, ) -> Result<EncryptedDB>
pub fn from_encrypted( encrypted: Vec<u8>, path: String, pwd: String, salt: String, ) -> Result<EncryptedDB>
pub fn from_file(path: String, pwd: String, salt: String) -> Result<EncryptedDB>
pub fn new( bytes: Option<Vec<u8>>, decrypted: Option<Vec<u8>>, path: String, pwd: String, salt: String, ) -> Result<EncryptedDB>
pub fn bytes(&self) -> Vec<u8> ⓘ
pub fn decrypt(&mut self) -> Result<()>
pub fn decrypted(&self) -> Vec<u8> ⓘ
pub fn encrypt(&mut self) -> Result<()>
pub fn path(&self) -> String
pub fn pwd(&self) -> String
pub fn read(&mut self) -> Result<()>
pub fn salt(&self) -> String
pub fn write(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for EncryptedDB
impl RefUnwindSafe for EncryptedDB
impl Send for EncryptedDB
impl Sync for EncryptedDB
impl Unpin for EncryptedDB
impl UnwindSafe for EncryptedDB
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