Struct pueue_lib::task::Task[][src]

pub struct Task {
Show fields pub id: usize, pub original_command: String, pub command: String, pub path: String, pub envs: HashMap<String, String>, pub group: String, pub enqueue_at: Option<DateTime<Local>>, pub dependencies: Vec<usize>, pub label: Option<String>, pub status: TaskStatus, pub prev_status: TaskStatus, pub result: Option<TaskResult>, pub start: Option<DateTime<Local>>, pub end: Option<DateTime<Local>>,
}
Expand description

Representation of a task. start will be set the second the task starts processing. result, output and end won’t be initialized, until the task has finished.

Fields

id: usizeoriginal_command: Stringcommand: Stringpath: Stringenvs: HashMap<String, String>group: Stringenqueue_at: Option<DateTime<Local>>dependencies: Vec<usize>label: Option<String>status: TaskStatusprev_status: TaskStatus

This field is only used when editing the path/command of a task. It’s necessary, since we enter the Locked state during editing. However, we have to go back to the previous state after we finished editing.

result: Option<TaskResult>start: Option<DateTime<Local>>end: Option<DateTime<Local>>

Implementations

A convenience function used to duplicate a task.

Whether the task is having a running process managed by the TaskHandler

Whether the task’s process finished.

Check if the task errored.
It either didn’t run yet or finished successfully.

Small convenience function to set the task’s group to the default group.

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

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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)

recently added

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.