pub struct Storage { /* private fields */ }Implementations§
Source§impl Storage
impl Storage
pub fn new() -> Result<Self>
pub fn load(&self) -> Result<Vec<Reminder>>
pub fn save(&self, reminders: &[Reminder]) -> Result<()>
pub fn add(&self, reminder: Reminder) -> Result<()>
pub fn delete(&self, id: Uuid) -> Result<bool>
pub fn update( &self, id: Uuid, updater: impl FnOnce(&mut Reminder), ) -> Result<bool>
pub fn get(&self, id: Uuid) -> Result<Option<Reminder>>
pub fn pid_file_path() -> Result<PathBuf>
pub fn log_file_path() -> Result<PathBuf>
Sourcepub fn export_to_file(&self, path: &Path) -> Result<usize>
pub fn export_to_file(&self, path: &Path) -> Result<usize>
Export all reminders to a JSON file
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
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