pub trait ProjectNode {
// Required methods
fn number(&self) -> u32;
fn title(&self) -> &str;
fn status(&self) -> &str;
fn project_ids(&self) -> &[String];
}Expand description
The minimum an issue must expose for project derivation.
WP03 implements this for crate::model::Issue. Keeping it a trait is what
lets this module be written and tested without src/model.rs, which WP03
owns.
Required Methods§
Sourcefn project_ids(&self) -> &[String]
fn project_ids(&self) -> &[String]
The stored project ids, in the order the file carries them.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ProjectNode for Issue
Read in place, for the same reason as crate::hierarchy::HierarchyNode:
projects cannot import model without a cycle, and Issue is what every
store-level caller already holds. Implementing it here rather than building a
projection keeps one snapshot shared by the service that decides and the storage
layer that writes.
project_ids borrows the stored list; an absent field is the empty slice, so the
service sees “no associations” without a second representation.