pub struct MemoryReminderStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for MemoryReminderStore
impl Default for MemoryReminderStore
Source§impl ReminderStore for MemoryReminderStore
impl ReminderStore for MemoryReminderStore
Source§fn save(&self, reminder: &Reminder) -> Result<(), ReminderError>
fn save(&self, reminder: &Reminder) -> Result<(), ReminderError>
Persist a new reminder. The
id field is already populated by
CreateReminder::into_reminder().Source§fn update(&self, reminder: &Reminder) -> Result<(), ReminderError>
fn update(&self, reminder: &Reminder) -> Result<(), ReminderError>
Overwrite the full reminder record (used after in-place mutations).
Source§fn update_if_unchanged(
&self,
expected: &Reminder,
new: &Reminder,
) -> Result<bool, ReminderError>
fn update_if_unchanged( &self, expected: &Reminder, new: &Reminder, ) -> Result<bool, ReminderError>
Write
new only if the stored reminder still equals expected (what
the caller read). Returns Ok(false) when it changed in between; the
caller re-reads and re-applies. Every lifecycle method is a
read-modify-write of the whole record, and an unconditional update
silently reverted a concurrent change (a cancel, snooze, or execution
record) while both calls returned Ok. Read moreSource§fn delete(&self, id: &str) -> Result<bool, ReminderError>
fn delete(&self, id: &str) -> Result<bool, ReminderError>
Delete a reminder permanently (hard delete, for admin use only;
normal cancellation uses
update with status: Cancelled).Source§fn list(&self, filter: &ReminderFilter) -> Result<Vec<Reminder>, ReminderError>
fn list(&self, filter: &ReminderFilter) -> Result<Vec<Reminder>, ReminderError>
Return all reminders matching
filter, ordered by priority then
due_at ascending.Auto Trait Implementations§
impl !Freeze for MemoryReminderStore
impl RefUnwindSafe for MemoryReminderStore
impl Send for MemoryReminderStore
impl Sync for MemoryReminderStore
impl Unpin for MemoryReminderStore
impl UnsafeUnpin for MemoryReminderStore
impl UnwindSafe for MemoryReminderStore
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