pub struct Task {
pub id: TaskId,
pub kind: TaskKind,
pub settings: TaskSettings,
pub output_type: TypeDesc,
pub outcomes: Vec<OutcomeDecl>,
pub group: Option<String>,
pub expand: Option<Expand>,
pub secrets: Vec<SecretDecl>,
pub connections: Vec<String>,
pub cleanup: Option<TaskCleanup>,
}Expand description
A task of a DAG.
Fields§
§id: TaskIdThe task’s ID, unique within its DAG.
kind: TaskKindIts kind and what it runs.
settings: TaskSettingsIts resolved settings.
output_type: TypeDescThe type of its output (process_result for commands, none for empty tasks).
outcomes: Vec<OutcomeDecl>The outcomes it may end with (see archive/PROJECT.md, Task results and outcomes).
group: Option<String>The group it belongs to (the innermost), if any (decision 64).
expand: Option<Expand>What its instances vary over, for a mapped task (.expand(...)); its arguments are
then the fixed ones (.partial(...)).
secrets: Vec<SecretDecl>The secrets it declares (secrets=): read on demand, never put in its environment.
connections: Vec<String>The connections it opens (connections=, decision 179), by name: only these, opened
before it starts.
cleanup: Option<TaskCleanup>Its cleanup, if it has one.
Implementations§
Source§impl Task
impl Task
Sourcepub fn outcome_of_exit(&self, code: i32) -> Option<&str>
pub fn outcome_of_exit(&self, code: i32) -> Option<&str>
The outcome a command task’s exit code means, if it declared it.
Source§impl Task
impl Task
Sourcepub fn cleanup_command(&self) -> Option<&CommandLine>
pub fn cleanup_command(&self) -> Option<&CommandLine>
Its cleanup’s command line, if it has one.
Sourcepub fn cleanup_script_args(&self) -> &[Template]
pub fn cleanup_script_args(&self) -> &[Template]
Its cleanup script’s arguments, if it has one.
Sourcepub fn references(&self) -> Vec<&Reference>
pub fn references(&self) -> Vec<&Reference>
Every reference the task uses (arguments, command line, environment, what it is mapped over), in order.
Sourcepub fn secret_references(&self) -> Vec<&SecretName>
pub fn secret_references(&self) -> Vec<&SecretName>
The secrets its references name, in order (each once).
Sourcepub fn argument_references(&self) -> Vec<&Reference>
pub fn argument_references(&self) -> Vec<&Reference>
The references of its arguments, command line and environment, in order: all but what it is mapped over.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Task
Source§impl JsonSchema for Task
impl JsonSchema for Task
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more