pub struct Db {
pub access_token: Option<String>,
pub refresh_token: Option<String>,
pub kdf: Option<KdfType>,
pub iterations: Option<u32>,
pub memory: Option<u32>,
pub parallelism: Option<u32>,
pub protected_key: Option<String>,
pub protected_private_key: Option<String>,
pub protected_org_keys: HashMap<String, String>,
pub entries: Vec<Entry>,
}
Fields§
§access_token: Option<String>
§refresh_token: Option<String>
§kdf: Option<KdfType>
§iterations: Option<u32>
§memory: Option<u32>
§parallelism: Option<u32>
§protected_key: Option<String>
§protected_private_key: Option<String>
§protected_org_keys: HashMap<String, String>
§entries: Vec<Entry>
Implementations§
source§impl Db
impl Db
pub fn new() -> Self
pub fn load(server: &str, email: &str) -> Result<Self>
pub async fn load_async(server: &str, email: &str) -> Result<Self>
pub fn save(&self, server: &str, email: &str) -> Result<()>
pub async fn save_async(&self, server: &str, email: &str) -> Result<()>
pub fn remove(server: &str, email: &str) -> Result<()>
pub fn needs_login(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Db
impl<'de> Deserialize<'de> for Db
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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