pub struct IssueView<'a> {
pub number: u32,
pub title: &'a str,
pub status: &'a str,
pub relationships: &'a [Relationship],
pub has_retired_links_key: bool,
pub parent: Option<u32>,
}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§
§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<u32>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_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<u32>) -> Self
pub fn with_parent(self, parent: Option<u32>) -> Self
Build an issue view carrying a decomposition parent.
Trait Implementations§
impl<'a> Copy for IssueView<'a>
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