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 strThe store-relative filename, used as an input alias.
number: u32The stable issue number (Issue::number, never reused).
title: &'a strThe issue title, used to build display names.
status: &'a strThe 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: boolWhether 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>
impl<'a> IssueView<'a>
Sourcepub fn new(
number: u32,
title: &'a str,
status: &'a str,
relationships: &'a [Relationship],
) -> Self
pub fn new( number: u32, title: &'a str, status: &'a str, relationships: &'a [Relationship], ) -> Self
Build an issue view without the retired-key flag.
Sourcepub fn with_identity(self, id: Option<&'a str>, filename: &'a str) -> Self
pub fn with_identity(self, id: Option<&'a str>, filename: &'a str) -> Self
Add the canonical identity and filename used by graph alias resolution.
Sourcepub fn with_retired_links_key(self, flagged: bool) -> Self
pub fn with_retired_links_key(self, flagged: bool) -> Self
Build an issue view, flagging a legacy links: key.
Sourcepub fn with_parent(self, parent: Option<IssueRef>) -> Self
pub fn with_parent(self, parent: Option<IssueRef>) -> Self
Build an issue view carrying a decomposition parent.
Trait Implementations§
impl<'a> Copy for IssueView<'a>
Source§impl HierarchyNode for IssueView<'_>
impl HierarchyNode for IssueView<'_>
Source§fn status(&self) -> &str
fn status(&self) -> &str
Source§fn canonical_id(&self) -> Option<&str>
fn canonical_id(&self) -> Option<&str>
Source§fn filename(&self) -> Option<&str>
fn filename(&self) -> Option<&str>
Source§fn parent_ref(&self) -> Option<&IssueRef>
fn parent_ref(&self) -> Option<&IssueRef>
None means no parent.Source§fn parent_number(&self) -> Option<u32>
fn parent_number(&self) -> Option<u32>
Source§impl IdentityNode for IssueView<'_>
impl IdentityNode for IssueView<'_>
Source§fn canonical_id(&self) -> Option<&str>
fn canonical_id(&self) -> Option<&str>
Source§fn issue_number(&self) -> u32
fn issue_number(&self) -> u32
Source§fn issue_filename(&self) -> &str
fn issue_filename(&self) -> &str
Source§fn issue_title(&self) -> &str
fn issue_title(&self) -> &str
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> 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,
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