pub enum Schedule {
At {
date: OffsetDateTime,
repeating: bool,
allow_while_idle: bool,
},
Interval {
interval: ScheduleInterval,
allow_while_idle: bool,
},
Every {
interval: ScheduleEvery,
count: u8,
allow_while_idle: bool,
},
}Expand description
Defines when a notification is delivered.
Scheduling is only implemented on mobile; the desktop implementation delivers the notification immediately and ignores the schedule.
Variants§
At
Fires at a specific date and time, which must be in the future.
Fields
§
date: OffsetDateTimeThe date and time the notification fires at, serialized as an ISO-8601 string.
Interval
Fires whenever the current date matches every field set on the given interval.
Fields
§
interval: ScheduleIntervalThe date fields the current date must match for the notification to fire.
Every
Fires repeatedly, once every count times the given interval unit.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schedule
impl<'de> Deserialize<'de> for Schedule
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 Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
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