pub struct Task {Show 14 fields
pub id: NativeId,
pub title: String,
pub content: Option<String>,
pub status: Status,
pub labels: Vec<Label>,
pub project: Option<NativeId>,
pub url: Option<String>,
pub location: Option<Location>,
pub created_at: Option<DateTime<Utc>>,
pub updated_at: Option<DateTime<Utc>>,
pub metadata: BTreeMap<String, Value>,
pub repositories: Vec<Repository>,
pub delivers: Vec<TaskRef>,
pub delivered_by: Vec<TaskRef>,
}Expand description
One unit of work as a source reports it.
Fields§
§id: NativeIdThe source’s own opaque identifier.
title: StringThe one-line summary a user recognises the task by.
content: Option<String>The long-form body, when the source has one.
status: StatusThe source’s status, normalised and preserved.
labels: Vec<Label>Inline rather than by id: a source returning a task already knows them.
project: Option<NativeId>None is a first-class case — an orphan task — not an edge case.
url: Option<String>Where a human can open this task.
location: Option<Location>Where this task is, when the source says (see Location).
Absent by default, so a source that predates this field — and every source that
simply does not say — reads as None, which means the source did not say where
this is rather than this is nowhere. It neither replaces nor derives from
url, which goes on meaning exactly what it always did.
created_at: Option<DateTime<Utc>>When the source says the task was created.
updated_at: Option<DateTime<Utc>>When the source says the task last changed.
metadata: BTreeMap<String, Value>Caller-defined attributes, preserving their JSON types.
Keys are free-form, with two reserved prefixes: onetaskgraph. belongs to this
product — Repository::METADATA_KEY and DependencyEdge::RECORDED_KEY are
the two every source honours, and ItemKind::METADATA_KEY is one plugin’s —
and onepipeline. belongs to that consumer. Every other key is the caller’s, and
a source returns it exactly as it holds it.
repositories: Vec<Repository>Normalized repository origins this task concerns, in source order and without repeats.
delivers: Vec<TaskRef>The tasks this one delivers: finishing this task finishes them.
Each entry is a TaskRef — <source>:<native> names a task of any source, and a
bare native id names a task of the source holding this one — with no repeats and
never this task itself. Empty by default, and left out of the wire when empty, so a
reader written before the field existed reads exactly what it read before.
delivered_by: Vec<TaskRef>Every task that delivers this one, by qualified id: the reverse of Self::delivers.
Owned by the store, not by a source record and not by a copy. The engine keeps it
in step whenever it writes a task’s delivers, through
TaskSource::set_delivered_by; a source holds
and reports it, and a copy keeps the destination’s own rather than taking the
source’s. Empty by default and left out of the wire when empty, as delivers is.
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>,
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