Skip to main content

IssueView

Struct IssueView 

Source
pub struct IssueView<'a> {
    pub id: Option<&'a str>,
    pub filename: &'a str,
    pub number: u32,
    pub title: &'a str,
    pub status: &'a str,
    pub relationships: &'a [Relationship],
    pub has_retired_links_key: bool,
    pub parent: Option<IssueRef>,
}
Expand description

The minimal projection of an issue that the relationship service needs.

This is deliberately not crate::model::Issue: the issue model gains its typed relationship field in a later work package, and keeping the service on a narrow view means the graph stays filesystem-free and testable with a plain in-memory list.

Fields§

§id: Option<&'a str>

The canonical id, when this issue has one.

§filename: &'a str

The store-relative filename, used as an input alias.

§number: u32

The stable issue number (Issue::number, never reused).

§title: &'a str

The issue title, used to build display names.

§status: &'a str

The board column the issue sits in, compared against done_column.

§relationships: &'a [Relationship]

The issue’s stored relationships, in authored file order.

§has_retired_links_key: bool

Whether the source frontmatter still carries a legacy links: key. The key is reported as a validation result and never read as typed data (C-001); this flag is how the storage layer signals it.

§parent: Option<IssueRef>

The issue’s decomposition parent, as an issue number.

Present on the relationship service’s view so the hierarchy service (crate::hierarchy) reads the same in-memory projection rather than a parallel one built by each caller. Two projections of one issue type is how two services end up disagreeing about the same snapshot — the divergence contracts/surface-parity.md §3 exists to prevent.

Not read by the relationship graph. A parent is a decomposition and a blocks edge is a scheduling dependency; they are separate fields and are never combined (C-007).

Implementations§

Source§

impl<'a> IssueView<'a>

Source

pub fn new( number: u32, title: &'a str, status: &'a str, relationships: &'a [Relationship], ) -> Self

Build an issue view without the retired-key flag.

Source

pub fn with_identity(self, id: Option<&'a str>, filename: &'a str) -> Self

Add the canonical identity and filename used by graph alias resolution.

Build an issue view, flagging a legacy links: key.

Source

pub fn with_parent(self, parent: Option<IssueRef>) -> Self

Build an issue view carrying a decomposition parent.

Source

pub fn graph_ref(&self) -> IssueRef

The canonical graph reference for this issue.

Trait Implementations§

Source§

impl<'a> Clone for IssueView<'a>

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<'a> Copy for IssueView<'a>

Source§

impl<'a> Debug for IssueView<'a>

Source§

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

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

impl HierarchyNode for IssueView<'_>

Source§

fn number(&self) -> u32

The issue’s number, which is its stable identity.
Source§

fn title(&self) -> &str

The issue’s title, used only for the derived display label.
Source§

fn status(&self) -> &str

The issue’s raw status, compared against the caller’s completion column.
Source§

fn canonical_id(&self) -> Option<&str>

The canonical issue id, when the record has one.
Source§

fn filename(&self) -> Option<&str>

The store-relative filename used by the shared alias index.
Source§

fn parent_ref(&self) -> Option<&IssueRef>

The stored canonical parent reference. None means no parent.
Source§

fn parent_number(&self) -> Option<u32>

Legacy numeric parent alias used by in-memory test nodes.
Source§

impl IdentityNode for IssueView<'_>

Source§

fn canonical_id(&self) -> Option<&str>

The canonical issue id, when this record has one.
Source§

fn issue_number(&self) -> u32

The human-facing number alias.
Source§

fn issue_filename(&self) -> &str

The store-relative filename.
Source§

fn issue_title(&self) -> &str

The current title.

Auto Trait Implementations§

§

impl<'a> Freeze for IssueView<'a>

§

impl<'a> RefUnwindSafe for IssueView<'a>

§

impl<'a> Send for IssueView<'a>

§

impl<'a> Sync for IssueView<'a>

§

impl<'a> Unpin for IssueView<'a>

§

impl<'a> UnsafeUnpin for IssueView<'a>

§

impl<'a> UnwindSafe for IssueView<'a>

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.