pub struct Issue {Show 18 fields
pub number: u32,
pub title: String,
pub status: Status,
pub labels: Labels,
pub priority: Priority,
pub assignee: Option<String>,
pub estimate: Option<String>,
pub commit: Option<String>,
pub gitlab_id: Option<String>,
pub linear_id: Option<String>,
pub mission: Option<String>,
pub task: Option<String>,
pub links: Vec<String>,
pub files: Vec<String>,
pub created: String,
pub updated: String,
pub filename: String,
pub body: String,
}Expand description
An issue: one markdown file with YAML frontmatter.
Field order and names are frozen by contracts/file-format.md FR-012.
number is a stored frontmatter key assigned by the storage layer at
create time by scanning the live issue set (issue #52; previously from
tix.toml [state].next_number, which is no longer persisted); this
module models and validates it but never allocates. filename and
body are memory-only (#[serde(skip)]).
Fields§
§number: u32Internal sequential id, never reused (C-007).
title: StringHuman title; drives the slug in the filename.
status: StatusColumn (board workflow stage) the issue sits in.
labels: LabelsFree-form labels.
priority: PriorityPriority; defaults to medium.
assignee: Option<String>Assignee. In memory: bare handle (alice) or full Name <email>
identity, verbatim. Files serialize per the rule documented on
[de_assignee]/[se_assignee] (legacy @alice tolerated on read).
estimate: Option<String>Free-form estimate (e.g. 2, S, 3d); default null.
commit: Option<String>Git commit recorded when moved to done (FR-026).
gitlab_id: Option<String>Remote GitLab issue id after export/import.
linear_id: Option<String>Remote Linear issue id after export/import.
mission: Option<String>Spec Kitty mission slug (e.g. v3-archive-review) this issue belongs to, if any.
task: Option<String>Spec Kitty work package id (e.g. WP01) this issue links to, if any.
links: Vec<String>Related issue numbers, as authored (tolerant like labels); symmetric
links maintained by tix link/--links writes. Default [].
files: Vec<String>Repo-relative file paths of the governing specification (e.g.
openspec/changes/<name>/specs/<cap>/spec.md). Default [].
created: StringCreation date, YYYY-MM-DD, equals the filename date prefix.
updated: StringLast-mutation date, YYYY-MM-DD.
filename: StringIssue file name — path relative to the issues dir (e.g. alice/2026-05-10-fix-login.md for grouped layout, or 2026-05-10-fix-login.md for legacy flat files per C-010).
body: StringRaw markdown body; memory-only, preserved verbatim.
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn parse(contents: &str) -> Result<Self>
pub fn parse(contents: &str) -> Result<Self>
Parse a full issue file (frontmatter + body) from its text.
The first line must be ---; the closing --- terminates the
frontmatter. The body after it is preserved verbatim (the single
structural separator blank line is consumed).
Sourcepub fn frontmatter(&self) -> String
pub fn frontmatter(&self) -> String
Serialize just the frontmatter YAML (no delimiters), with None
fields omitted except created/updated which are always present.
Sourcepub fn to_file_contents(&self) -> String
pub fn to_file_contents(&self) -> String
Render the full issue file: ---, frontmatter, closing ---,
blank separator and the raw body.
Sourcepub fn filename_stem(&self) -> String
pub fn filename_stem(&self) -> String
The date-prefixed filename stem: {created}-{slug} (C-008).
Sourcepub fn bump_updated(&mut self)
pub fn bump_updated(&mut self)
Record a mutation by stamping today’s date into updated.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
The description: everything above the first top-level ## Comments
heading, trimmed of trailing whitespace. With no section, the whole
body is the description.
Sourcepub fn comments(&self) -> Vec<Comment>
pub fn comments(&self) -> Vec<Comment>
The comments parsed from the ## Comments section, in file order
(NFR-005). With no section — or a section with no ### heads —
returns an empty vec.
Sourcepub fn add_comment(&mut self, author: &str, text: &str)
pub fn add_comment(&mut self, author: &str, text: &str)
Append a comment to the ## Comments section.
Whitespace-only text is discarded and the body is left untouched (FR-004 case 4). Otherwise the section is created if absent and the comment block is appended after the last existing comment. The description and any existing comments are never rewritten.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Issue
impl<'de> Deserialize<'de> for Issue
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 Issue
impl StructuralPartialEq for Issue
Auto Trait Implementations§
impl Freeze for Issue
impl RefUnwindSafe for Issue
impl Send for Issue
impl Sync for Issue
impl Unpin for Issue
impl UnsafeUnpin for Issue
impl UnwindSafe for Issue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more