Skip to main content

ProjectNode

Trait ProjectNode 

Source
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§

Source

fn number(&self) -> u32

The issue’s number, which is its identity within one snapshot.

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.

Source

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§

Source§

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.