pub struct ScheduleReceiver { /* private fields */ }
Implementations§
Source§impl ScheduleReceiver
impl ScheduleReceiver
pub fn new() -> Self
Sourcepub fn start_date(self, year: i32, month: u32, day: u32) -> Self
pub fn start_date(self, year: i32, month: u32, day: u32) -> Self
Sets the UTC
start date for the scheduled task.
If the provided date is in the past, the scheduler will calculate the next valid future run based on the defined interval.
Note: Scheduler is using UTC: Coordinated Universal Time
to avoid daylight saving problems.
Sourcepub fn start_time(self, hour: u32, minute: u32, second: u32) -> Self
pub fn start_time(self, hour: u32, minute: u32, second: u32) -> Self
Sets the UTC
start time for the scheduled task.
If the provided time is in the past, the scheduler will calculate the next valid future run based on the defined interval.
Note: Scheduler is using UTC: Coordinated Universal Time
to avoid daylight saving problems.
Sourcepub fn interval(self, interval: ScheduleInterval) -> Self
pub fn interval(self, interval: ScheduleInterval) -> Self
Sets the interval of how frequently the task should run.
pub fn trigger<T, Fut>(self, callback: T) -> Self
pub async fn receive(self)
Auto Trait Implementations§
impl Freeze for ScheduleReceiver
impl !RefUnwindSafe for ScheduleReceiver
impl Send for ScheduleReceiver
impl Sync for ScheduleReceiver
impl Unpin for ScheduleReceiver
impl !UnwindSafe for ScheduleReceiver
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