pub enum PeriodicTaskResult {
Ok,
CancelTask,
TaskReSchedule(PeriodicTaskTime),
}Expand description
A result of the task execution which is returned by the user task. See description for the each variant.
Variants§
Ok
The task exec was ok. No errors.
CancelTask
Cancels (but not removing) the task due to error or for other reason.
By returning this result the timer is unset to stop generating events.
But, if since the AbortTask was received and a timer has timed out again
the event will be called again. It is not necessary to return the AbortTask again,
just return PeriodicTaskResult::Ok exiting imidiatly.
TaskReSchedule(PeriodicTaskTime)
A request to reschedule the task to a new time or interval. The 0 argument
should contain new time. The timer mode can be changed.
Trait Implementations§
Source§impl Clone for PeriodicTaskResult
impl Clone for PeriodicTaskResult
Source§fn clone(&self) -> PeriodicTaskResult
fn clone(&self) -> PeriodicTaskResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeriodicTaskResult
impl Debug for PeriodicTaskResult
Source§impl PartialEq for PeriodicTaskResult
impl PartialEq for PeriodicTaskResult
impl Copy for PeriodicTaskResult
impl Eq for PeriodicTaskResult
impl StructuralPartialEq for PeriodicTaskResult
Auto Trait Implementations§
impl Freeze for PeriodicTaskResult
impl RefUnwindSafe for PeriodicTaskResult
impl Send for PeriodicTaskResult
impl Sync for PeriodicTaskResult
impl Unpin for PeriodicTaskResult
impl UnwindSafe for PeriodicTaskResult
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