Skip to main content

Issue

Struct Issue 

Source
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: u32

Internal sequential id, never reused (C-007).

§title: String

Human title; drives the slug in the filename.

§status: Status

Column (board workflow stage) the issue sits in.

§labels: Labels

Free-form labels.

§priority: Priority

Priority; 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: String

Creation date, YYYY-MM-DD, equals the filename date prefix.

§updated: String

Last-mutation date, YYYY-MM-DD.

§filename: String

Issue 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: String

Raw markdown body; memory-only, preserved verbatim.

Implementations§

Source§

impl Issue

Source

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).

Source

pub fn frontmatter(&self) -> String

Serialize just the frontmatter YAML (no delimiters), with None fields omitted except created/updated which are always present.

Source

pub fn to_file_contents(&self) -> String

Render the full issue file: ---, frontmatter, closing ---, blank separator and the raw body.

Source

pub fn filename_stem(&self) -> String

The date-prefixed filename stem: {created}-{slug} (C-008).

Source

pub fn bump_updated(&mut self)

Record a mutation by stamping today’s date into updated.

Source

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.

Source

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.

Source

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 Clone for Issue

Source§

fn clone(&self) -> Issue

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Issue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Issue

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Issue

Source§

impl PartialEq for Issue

Source§

fn eq(&self, other: &Issue) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Issue

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.