Skip to main content

Card

Struct Card 

Source
pub struct Card {
Show 25 fields pub reference: IssueRef, pub number: u32, pub title: String, pub priority: Priority, pub labels: Vec<String>, pub assignee: Option<String>, pub filename: String, pub commit: Option<String>, pub created: String, pub due_date: Option<String>, pub status: String, pub category: Option<String>, pub category_color: Option<ColorHint>, pub done: bool, pub cycle: Option<String>, pub milestone: Option<String>, pub blocked: Option<String>, pub children: Option<String>, pub parent: Option<IssueRef>, pub depth: u8, pub archived: bool, pub health: Option<String>, pub related: usize, pub projects: Vec<String>, pub epics: Vec<String>,
}

Fields§

§reference: IssueRef

Canonical identity of the issue this card displays.

§number: u32§title: String§priority: Priority§labels: Vec<String>§assignee: Option<String>§filename: String§commit: Option<String>§created: String§due_date: Option<String>§status: String§category: Option<String>

The issue’s resolved category label, from the service’s own label() (WP05 T022, FR-004).

Some for a column the board configures, None for one it does not — a configuration error the user should be able to see, rather than a transition-policy default silently applied to a display. The renderer shows (unmapped) for None.

The label carries the meaning, not the color. A board or terminal with no color must still convey the category, so the label is always rendered and the color_hint only ever tints it (T022 step 3, research R6).

§category_color: Option<ColorHint>

The category’s color hint, for tinting. Advisory only: dropping it changes the display’s color and nothing else.

§done: bool

Whether the service considers this issue complete (WP05, C-004).

Was issue.status.is(done_column) — a column-name comparison. On a board whose category_map puts completed somewhere other than its done_column that is a different question from the one the service answers, and this flag drives the card’s completion styling and the group’s rollup.

§cycle: Option<String>§milestone: Option<String>§blocked: Option<String>

The issue’s blocked reason, from the relationship service, or None.

Derived, never stored (data-model §4, C-003): recomputed from the graph on every board build, so a card cannot show a stale blocked state after its blocker moved.

§children: Option<String>

The issue’s hierarchy marker: 3 for three children, 3 1/3 when one is complete, or None for a leaf.

None for a leaf rather than Some("0"), so a card cannot show a child count for an issue that is not a parent. Built from the service’s crate::commands::parent::HierarchyFacts on every board build, so it cannot go stale when a child is created or moved — the same discipline blocked follows.

§parent: Option<IssueRef>

The issue’s decomposition parent, when it has one (tix #1399).

Carried on the card rather than looked up at render time, so the board can place a sub-issue beneath its parent without a second pass over the issues.

§depth: u8

How deeply the card is nested in the board’s tree rendering (tix #1399).

0 for a top-level card, 1 for a sub-issue shown directly under its parent. Never above 1: only one level is rendered, so a grandchild stays at 0 and is drawn as a normal top-level card.

§archived: bool

Whether this issue is archived — its file is dot-prefixed (issue #1492).

A card only ever carries true on a board built with archived issues included (the TUI’s archive toggle); the default board is enumerated from the active set and never sees one. Rendered as the [archived] token, in the same bracketed language as [~] and [N].

§health: Option<String>

The issue’s compact health badge (mission project-issue-health-status-01M3C8HX, WP06 T030): the state the issue records, and the derived value beside it when the two differ (at_risk->needs_attention).

Built from the shared index and rollup — never from a surface-local reading of the health: block, and never from a comparison of statuses (C-006). The spelling is the state’s stable as_str(), the same word the CLI’s --columns health cell prints, so the two surfaces cannot diverge. None when the issue records no health at all: a legacy card carries no badge, exactly as a leaf carries no child marker, so the board stays scannable.

§related: usize

How many related_issues entries the issue carries (tix #1513).

A plain count, computed from the issue set the board was built over, so the card cannot go stale when the field is edited — the same discipline blocked and children follow. 0 means no marker at all, which keeps a column of cards scannable.

§projects: Vec<String>

The issue’s resolved project ids, in registry declaration order (WP06 T028).

Resolved once per board build from the shared membership index (crate::projects::ProjectIndex::build), so the board cannot disagree with tix project list about who is a member, and an association the registry does not know is not a project here either. Empty means the issue is in no project, which is the bucket the partition labels (no project).

Carried on the card rather than looked up at render time for the same reason blocked, children and related are: the renderer has no store, and a second read of the issue set per frame is work the build already did.

§epics: Vec<String>

The issue’s resolved epic ids, in registry declaration order (WP06 T030).

Resolved once per board build from the shared membership index (crate::epics::EpicIndex::build) — only references the registry can resolve — so the board cannot disagree with tix epic list about who is a member, and a reference the registry does not know is not an epic here either. Empty means the issue is in no epic, which is the bucket the partition labels (no epic).

Carried on the card rather than looked up at render time for the same reason projects is: the renderer has no store, and a second read of the issue set per frame is work the build already did.

Trait Implementations§

Source§

impl Clone for Card

Source§

fn clone(&self) -> Self

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 Card

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Card

§

impl RefUnwindSafe for Card

§

impl Send for Card

§

impl Sync for Card

§

impl Unpin for Card

§

impl UnsafeUnpin for Card

§

impl UnwindSafe for Card

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