pub struct Reminder {
pub id: Uuid,
pub title: String,
pub description: Option<String>,
pub schedule: ReminderSchedule,
pub created_at: DateTime<Local>,
pub next_trigger: Option<DateTime<Local>>,
pub completed: bool,
pub paused: bool,
pub tags: HashSet<String>,
}Fields§
§id: Uuid§title: String§description: Option<String>§schedule: ReminderSchedule§created_at: DateTime<Local>§next_trigger: Option<DateTime<Local>>§completed: bool§paused: boolImplementations§
Source§impl Reminder
impl Reminder
pub fn new_one_time( title: String, description: Option<String>, time: DateTime<Local>, tags: HashSet<String>, ) -> Self
pub fn new_cron( title: String, description: Option<String>, cron_expr: String, tags: HashSet<String>, ) -> Result<Self>
pub fn calculate_next_trigger(&mut self)
pub fn is_due(&self) -> bool
pub fn pause(&mut self)
pub fn resume(&mut self)
pub fn status(&self) -> &'static str
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reminder
impl<'de> Deserialize<'de> for Reminder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Reminder
impl RefUnwindSafe for Reminder
impl Send for Reminder
impl Sync for Reminder
impl Unpin for Reminder
impl UnwindSafe for Reminder
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