pub struct TaskHandle { /* private fields */ }
Expand description

A handle used to control a TaskSchedule.

When the final handle is dropped, the computation governed by the TaskSchedule should terminate.

Implementations§

Trigger this handle’s corresponding schedule now.

Returns true if the schedule still exists, and false otherwise.

Trigger this handle’s corresponding schedule at instant.

Returns true if the schedule still exists, and false otherwise.

Cancel a pending firing of the handle’s corresponding schedule.

Returns true if the schedule still exists, and false otherwise.

Suspend execution of the corresponding schedule.

If the schedule is ready now, it will become pending; it won’t become ready again until resume() is called. If the schedule is waiting for a timer, the timer will keep counting, but the schedule won’t become ready until the timer has elapsed and resume() has been called.

Returns true if the schedule still exists, and false otherwise.

Resume execution of the corresponding schedule.

This method undoes the effect of a call to suspend(): the schedule will fire again if it is ready (or when it becomes ready).

This method won’t cause the schedule to fire if it was already cancelled. For that, use the fire() or fire_at()` methods.

Returns true if the schedule still exists, and false otherwise.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.