Struct delay_timer::timer::task::TaskBuilder[][src]

pub struct TaskBuilder<'a> { /* fields omitted */ }
Expand description

Cycle plan task builder.

Implementations

👎 Deprecated

Set task Frequency. This api will be deprecated in the future, please use set_frequency_once_* | set_frequency_count_down_* | set_frequency_repeated_* etc.

👎 Deprecated

Set task Frequency by customized CandyCronStr. In order to build a high-performance, highly reusable TaskBuilder that maintains the Copy feature .

when supporting building from CandyCronStr , here actively leaks memory for create a str-slice (because str-slice support Copy, String does not)

We need to call free manually before TaskBuilder drop or before we leave the scope.

Explain: Explicitly implementing both Drop and Copy trait on a type is currently disallowed.

This feature can make some sense in theory, but the current implementation is incorrect and can lead to memory unsafety (see (issue #20126), so it has been disabled for now. This api will be deprecated in the future, please use set_frequency_*_by_candy etc.

Set task-id.

Set maximum execution time (optional).

Set a task with the maximum number of parallel runs (optional).

Set time zone for cron-expression iteration time.

Spawn a task.

If we call set_frequency_by_candy explicitly and generate TaskBuilder, We need to call free manually before TaskBuilder drop or before we leave the scope.

Explain: Explicitly implementing both Drop and Copy trait on a type is currently disallowed. This feature can make some sense in theory, but the current implementation is incorrect and can lead to memory unsafety (see (issue #20126), so it has been disabled for now. So I can’t go through Drop and handle these automatically.

Task execution frequency: execute only once, set by cron expression.

Task execution frequency: countdown execution, set by cron expression.

Task execution frequency: execute repeatedly, set by cron expression.

Task execution frequency: execute only once, set by seconds num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: countdown execution, set by seconds num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute repeatedly, set by seconds num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute only once, set by minutes num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: countdown execution, set by minutes num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute repeatedly, set by minutes num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute only once, set by hours num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute repeatedly, set by hours num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: countdown execution, set by hours num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute only once, set by days num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute repeatedly, set by days num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: countdown execution, set by days num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Task execution frequency: execute only once, set by timestamp-seconds num.

Make sure time is greater than 1 seconds, otherwise undefined behavior will be triggered.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.