pub struct Task {
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>,
}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.
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