pub struct DataManager { /* private fields */ }Implementations§
Source§impl DataManager
impl DataManager
pub fn new(user_id: &str, app_package: &str) -> Result<Self>
pub fn get_path(&self, key: &str) -> PathBuf
pub fn read(&self, key: &str) -> Result<String>
pub fn read_json(&self, key: &str) -> Result<Value>
pub fn write(&self, key: &str, content: &str) -> Result<()>
pub fn write_json(&self, key: &str, value: &Value) -> Result<()>
pub fn delete(&self, key: &str) -> Result<()>
pub fn exists(&self, key: &str) -> bool
pub fn list(&self, prefix: &str) -> Result<Vec<String>>
pub fn read_binary(&self, key: &str) -> Result<Vec<u8>>
pub fn write_binary(&self, key: &str, data: &[u8]) -> Result<()>
pub fn read_yaml(&self, key: &str) -> Result<Value>
pub fn write_yaml(&self, key: &str, value: &Value) -> Result<()>
pub fn get_file_info(&self, key: &str) -> Result<(bool, DataFormat)>
Auto Trait Implementations§
impl Freeze for DataManager
impl RefUnwindSafe for DataManager
impl Send for DataManager
impl Sync for DataManager
impl Unpin for DataManager
impl UnsafeUnpin for DataManager
impl UnwindSafe for DataManager
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