pub struct KeyValueDb {
pub list: HashMap<String, String>,
pub db_open: bool,
pub record_loaded: bool,
pub db_obj: Connection,
pub db_path: String,
}Fields§
§list: HashMap<String, String>§db_open: bool§record_loaded: bool§db_obj: Connection§db_path: StringImplementations§
Source§impl KeyValueDb
impl KeyValueDb
pub fn new(db_name: &str) -> Self
pub fn load_records(&mut self)
pub fn set_value(&mut self, key: &str, value: &str) -> bool
pub fn get_value(&mut self, key: &str) -> Option<String>
pub fn delete(&mut self, key: &str) -> bool
pub fn flush(&mut self) -> bool
pub fn close(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KeyValueDb
impl !RefUnwindSafe for KeyValueDb
impl Send for KeyValueDb
impl !Sync for KeyValueDb
impl Unpin for KeyValueDb
impl !UnwindSafe for KeyValueDb
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