pub struct CategoryResolution {
pub unmapped: Vec<String>,
pub default_applied: bool,
pub explicit_policy: bool,
pub board: String,
/* private fields */
}Expand description
The built once-per-load derivation from column name to category
(data-model.md §3).
Fields§
§unmapped: Vec<String>Configured columns that resolved by the safe default rather than by an explicit mapping, in board order.
Recorded so a surface can report unmapped_column_default “where ambiguity
matters”. A column silently defaulting is the thing the contract is most
careful about, and it cannot be reported from the map alone.
default_applied: boolWhether any column relied on the default. Lets a caller skip the diagnostic entirely on a fully-mapped board.
explicit_policy: boolWhether the board declared a category_map, as opposed to resolving
every column through the safe default.
WP03. This is the signal that separates a board whose author described its
categories from one that never did, and it is what gates the terminal
lock. Without it, WP01’s legacy reconciliation (done_column resolves to
completed so completion detection works, FR-003) would silently hand every
existing repository a transition policy it never configured: moving an issue
back out of done would start failing on every board in the wild, and on the
TUI there is no flag or key to override it with for two more work packages.
Deliberately distinct from Self::default_applied: a board may declare a
category_map and still leave some columns to the default, so
default_applied is “some column is unmapped” while this is “a map was
written at all”. The lock is about intent, and intent is expressed by the
presence of the section.
Note the consequence, since it is a real one: a legacy board gets the completion definition and the commit-clearing rule, but not the terminal lock. Those are different things — completion answers “is this done?”, the lock answers “may this move?” — and the contract treats them in different sections for that reason.
board: StringThe board’s name, for diagnostics.
Implementations§
Source§impl CategoryResolution
impl CategoryResolution
Sourcepub fn resolve(&self, column: &str) -> Option<WorkflowCategory>
pub fn resolve(&self, column: &str) -> Option<WorkflowCategory>
The category column resolves to, or None for a column this board does
not configure.
A hash lookup. A caller that needs to distinguish “not configured” from
“configured but defaulted” uses Self::unmapped.
Sourcepub fn columns(&self) -> impl Iterator<Item = &str>
pub fn columns(&self) -> impl Iterator<Item = &str>
Every column this board configures, in board order.
Reads Self::order, not by_column, so the sequence is the board’s own
declaration order and is the same on every run (see the field’s note).
Sourcepub fn column_list(&self) -> String
pub fn column_list(&self) -> String
The board’s columns joined for a message, in board order.
WP03. A unknown_column refusal is the one diagnostic a user reads to work
out what to type instead, so it must list the valid columns. Rendering that
list in one place keeps every unknown_column message agreeing on it.
Sourcepub fn has_completion(&self) -> bool
pub fn has_completion(&self) -> bool
Whether any column resolves to completed.
Trait Implementations§
Source§impl Clone for CategoryResolution
impl Clone for CategoryResolution
Source§impl Debug for CategoryResolution
impl Debug for CategoryResolution
impl Eq for CategoryResolution
Source§impl PartialEq for CategoryResolution
impl PartialEq for CategoryResolution
impl StructuralPartialEq for CategoryResolution
Auto Trait Implementations§
impl Freeze for CategoryResolution
impl RefUnwindSafe for CategoryResolution
impl Send for CategoryResolution
impl Sync for CategoryResolution
impl Unpin for CategoryResolution
impl UnsafeUnpin for CategoryResolution
impl UnwindSafe for CategoryResolution
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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