pub struct BoardConfiguration {
pub columns: Vec<String>,
pub done_column: Option<String>,
pub category_map: IndexMap<String, String>,
pub hidden_columns: Vec<String>,
pub show_mismatch: bool,
pub wrap_titles: bool,
pub title_lines: usize,
pub card_order: Vec<String>,
pub order_by: OrderBy,
pub wip: WipConfig,
}Expand description
A named board configuration ([kanban.<name>] in tix.toml).
Carries the ordered column list plus per-configuration metadata: the done column, columns hidden from the rendered board, and whether the computed “Mismatched” pseudo-column is shown (C-002 / DM-01M2MH4D84NHG0JVWEPR6ZH4VR).
Serialize is written by hand (below) so every field equal to the value the
loader would supply is omitted on save, keeping a legacy tix.toml
byte-identical; Deserialize stays derived.
Fields§
§columns: Vec<String>Ordered, case-sensitive, non-empty, unique column names.
done_column: Option<String>The column treated as “done” (commit prompting). Defaults to "done"
when that name is present in columns, else the last configured
column (contracts/tix-toml.md field rules).
Its meaning is unchanged by this mission. It remains the commit-prompt
trigger and the legacy completion signal. WP02 reads the category for the
completion decision; this field is not reinterpreted here, and a
category_map does not change what it does.
category_map: IndexMap<String, String>Column name → category key (contract §2). Omitted when empty, so a board without a mapping gains no key on save.
A board with no map is a legacy board: its done_column resolves to
completed and every other column to the safe default. See
BoardConfiguration::category_for, which is the single place that
fallback lives — duplicating it in the service is how a board ends up with
two notions of its own default.
Columns hidden from the rendered board. Must be a subset of columns;
their cards stay in board state and remain reachable via filters/search.
show_mismatch: boolWhether the computed “Mismatched” pseudo-column is rendered. Default
false. Never a configured column.
wrap_titles: boolWhether long card titles wrap onto multiple lines. Default true.
title_lines: usizeThe maximum number of lines a wrapped card may occupy. Default 3;
validated >= 1 in [validate_board]. Ignored when wrap_titles
is false.
card_order: Vec<String>Sparse manual card order persisted by drag-and-drop reordering. When
non-empty, this order takes precedence over [order_by] for the cards
whose positions differ from the automatic ordering.
order_by: OrderByOrdering of cards within each rendered column. Default
created_at_desc (most recently created first).
wip: WipConfigPer-column work-in-progress limits and the estimate units they count in
(mission configurable-wip-limits-01M3C6WX). Absent by default and omitted
when empty, so a board that configures no limits gains no key on save — and
no status semantics change: the columns, their categories and the done
column mean exactly what they meant before (C-002).
Implementations§
Source§impl BoardConfiguration
impl BoardConfiguration
Sourcepub fn category_for<'c>(
&'c self,
column: &str,
categories: &'c CategoryConfig,
) -> &'c str
pub fn category_for<'c>( &'c self, column: &str, categories: &'c CategoryConfig, ) -> &'c str
The category column resolves to, given the global configuration.
The single place the fallback lives, and the seam WP02’s service builds on. Three cases, in order:
- An explicit
category_mapentry wins. - Otherwise, on a board with no map at all,
done_columniscompletedand every other column is the safe default. - Otherwise (a map exists but omits this column), the safe default.
Case 2 is a reconciliation, and the contract’s two rules collide without
it: “a board without a category_map inherits [categories].default for
every column” (§2) plus “no column maps to completed is a configuration
error” (§3) would reject every legacy tix.toml, while §2 also requires
that one to load unchanged (C-007). done_column is the resolution: it is
always a configured column, it already means “this column completes work”,
and using it keeps a legacy board’s completion behaviour exactly what it
was. A board that does declare a map gets no such help — a map that
forgot completed is a real mistake and is reported as one.
Sourcepub fn effective_done_column(&self) -> Option<&str>
pub fn effective_done_column(&self) -> Option<&str>
The resolved done column: the explicit done_column, else the one
BoardConfiguration::inferred_done_column derives from columns.
Trait Implementations§
Source§impl Clone for BoardConfiguration
impl Clone for BoardConfiguration
Source§impl Debug for BoardConfiguration
impl Debug for BoardConfiguration
Source§impl Default for BoardConfiguration
impl Default for BoardConfiguration
Source§impl<'de> Deserialize<'de> for BoardConfigurationwhere
BoardConfiguration: Default,
impl<'de> Deserialize<'de> for BoardConfigurationwhere
BoardConfiguration: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for BoardConfiguration
Source§impl From<&BoardConfiguration> for BoardDisplay
impl From<&BoardConfiguration> for BoardDisplay
Source§fn from(config: &BoardConfiguration) -> Self
fn from(config: &BoardConfiguration) -> Self
Source§impl From<BoardRecord> for BoardConfiguration
impl From<BoardRecord> for BoardConfiguration
Source§fn from(record: BoardRecord) -> Self
fn from(record: BoardRecord) -> Self
Source§impl PartialEq for BoardConfiguration
impl PartialEq for BoardConfiguration
Source§impl Serialize for BoardConfiguration
impl Serialize for BoardConfiguration
Source§fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serialize a board as a [kanban.<name>] table, omitting every field
that already equals the value the loader would supply (#1415).
columns is always written — a board without columns is not a board —
and category_map/card_order were already omitted when empty. The
display and ordering keys (hidden_columns, show_mismatch,
wrap_titles, title_lines, order_by) are omitted at their defaults,
and done_column when it already equals DEFAULT_DONE_COLUMN — the
value the loader fills in when the key is absent, since the container is
#[serde(default)]. Deserialize stays derived, so the round trip is a
fixed point: omitting a default writes nothing and loading a missing key
restores the same value.
impl StructuralPartialEq for BoardConfiguration
Auto Trait Implementations§
impl Freeze for BoardConfiguration
impl RefUnwindSafe for BoardConfiguration
impl Send for BoardConfiguration
impl Sync for BoardConfiguration
impl Unpin for BoardConfiguration
impl UnsafeUnpin for BoardConfiguration
impl UnwindSafe for BoardConfiguration
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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