pub struct UserConfigDB { /* private fields */ }Implementations§
Source§impl UserConfigDB
impl UserConfigDB
pub fn new(path: &str) -> Result<Self>
pub fn default() -> Result<Self>
pub fn set_string(&self, key: &str, value: &str) -> Result<()>
pub fn get_string(&self, key: &str) -> Result<Option<String>>
pub fn set_bool(&self, key: &str, value: bool) -> Result<()>
pub fn get_bool(&self, key: &str) -> Result<Option<bool>>
pub fn set_int(&self, key: &str, value: i64) -> Result<()>
pub fn get_int(&self, key: &str) -> Result<Option<i64>>
pub fn set_float(&self, key: &str, value: f64) -> Result<()>
pub fn get_float(&self, key: &str) -> Result<Option<f64>>
pub fn set_json<T: Serialize>(&self, key: &str, value: &T) -> Result<()>
pub fn get_json<T: for<'de> Deserialize<'de>>( &self, key: &str, ) -> Result<Option<T>>
pub fn delete(&self, key: &str) -> Result<bool>
pub fn exists(&self, key: &str) -> Result<bool>
pub fn get_all_by_prefix(&self, prefix: &str) -> Result<Vec<UserConfigEntry>>
pub fn get_all_by_type(&self, value_type: &str) -> Result<Vec<UserConfigEntry>>
pub fn get_all(&self) -> Result<Vec<UserConfigEntry>>
pub fn count(&self) -> Result<i64>
pub fn clear_all(&self) -> Result<u64>
pub fn export_to_json(&self) -> Result<String>
pub fn import_from_json(&self, json_str: &str) -> Result<u64>
Auto Trait Implementations§
impl !Freeze for UserConfigDB
impl !RefUnwindSafe for UserConfigDB
impl !Sync for UserConfigDB
impl !UnwindSafe for UserConfigDB
impl Send for UserConfigDB
impl Unpin for UserConfigDB
impl UnsafeUnpin for UserConfigDB
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