pub enum WorkflowCategory {
Backlog,
Unstarted,
Active,
Blocked,
Completed,
Canceled,
}Expand description
A category in the fixed global vocabulary (C-002).
The vocabulary is global and closed: a board maps its columns into these
keys and does not define its own. The spelling comes from WP01’s
CATEGORY_KEYS rather than from string literals here, so the config
validator and this service cannot disagree about what a category is.
Variants§
Implementations§
Source§impl WorkflowCategory
impl WorkflowCategory
Sourcepub const ALL: [WorkflowCategory; 6]
pub const ALL: [WorkflowCategory; 6]
Every category, in the vocabulary’s order.
Sourcepub fn from_key(key: &str) -> Option<Self>
pub fn from_key(key: &str) -> Option<Self>
Parse a key, or None for anything outside the vocabulary.
The Option is load-bearing: an unknown key is an error
(unknown_category), never a coerced default. A from_key that fell back
to unstarted would turn a typo in a config into a board where a column
silently means something else.
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether this category ends the workflow.
True for completed and canceled — which is exactly why completion is
not is_terminal(). A category can end the work without the work having
been completed.
Sourcepub fn is_complete(self) -> bool
pub fn is_complete(self) -> bool
Whether this category means the work is done.
The only definition of completion in the crate. canceled is terminal
and not complete.
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
Display text. Presentation only; never consulted for a decision.
Sourcepub fn color_hint(self) -> Option<ColorHint>
pub fn color_hint(self) -> Option<ColorHint>
A presentation hint for the TUI, or None where there is nothing to say.
Inert. It never affects resolution, policy, or reporting — a category with a colour and a category without one resolve identically. A colour that changed a decision would make the board’s appearance load-bearing.
Trait Implementations§
Source§impl Clone for WorkflowCategory
impl Clone for WorkflowCategory
impl Copy for WorkflowCategory
Source§impl Debug for WorkflowCategory
impl Debug for WorkflowCategory
impl Eq for WorkflowCategory
Source§impl Hash for WorkflowCategory
impl Hash for WorkflowCategory
Source§impl Ord for WorkflowCategory
impl Ord for WorkflowCategory
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WorkflowCategory
impl PartialEq for WorkflowCategory
Source§impl PartialOrd for WorkflowCategory
impl PartialOrd for WorkflowCategory
impl StructuralPartialEq for WorkflowCategory
Auto Trait Implementations§
impl Freeze for WorkflowCategory
impl RefUnwindSafe for WorkflowCategory
impl Send for WorkflowCategory
impl Sync for WorkflowCategory
impl Unpin for WorkflowCategory
impl UnsafeUnpin for WorkflowCategory
impl UnwindSafe for WorkflowCategory
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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