pub struct Document {
pub id: NativeId,
pub title: String,
pub content: Option<String>,
pub project: Option<NativeId>,
pub labels: Vec<Label>,
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 piece of information that lives in a project and is not work.
A document carries no status and no dependencies, and both omissions are the
contract rather than an oversight: a document is not work, so it has no place in a
status filter and no place in a dependency graph. ItemKind therefore gains no
document variant — that enum names what a dependency endpoint points at, and nothing
may point at a document.
A source says whether it has documents at all through
Capabilities::documents, and one that says it has
none is never asked for one.
Fields§
§id: NativeIdThe source’s own opaque identifier.
title: StringThe one-line summary a person recognises it by.
content: Option<String>The long-form body, when the source has one.
project: Option<NativeId>The project it lives in; None is an orphan document, exactly as it is on a
Task.
labels: Vec<Label>Inline, on the same terms as a Task’s.
url: Option<String>Where a person can open it, on the same terms as a Task’s.
location: Option<Location>Where it is, when the source says (see Location).
created_at: Option<DateTime<Utc>>When the source says it was created.
updated_at: Option<DateTime<Utc>>When the source says it last changed.
metadata: BTreeMap<String, Value>Caller-defined attributes, preserving their JSON types, with the same reserved
prefixes Task::metadata carries.
repositories: Vec<Repository>Normalized repository origins this document concerns, in source order and without
repeats, as a Task’s.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
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 Document
impl JsonSchema for Document
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