Skip to main content

BoardConfiguration

Struct BoardConfiguration 

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

§hidden_columns: Vec<String>

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: bool

Whether the computed “Mismatched” pseudo-column is rendered. Default false. Never a configured column.

§wrap_titles: bool

Whether long card titles wrap onto multiple lines. Default true.

§title_lines: usize

The 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: OrderBy

Ordering of cards within each rendered column. Default created_at_desc (most recently created first).

§wip: WipConfig

Per-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

Source

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:

  1. An explicit category_map entry wins.
  2. Otherwise, on a board with no map at all, done_column is completed and every other column is the safe default.
  3. 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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BoardConfiguration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BoardConfiguration

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for BoardConfiguration

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for BoardConfiguration

Source§

impl From<&BoardConfiguration> for BoardDisplay

Source§

fn from(config: &BoardConfiguration) -> Self

Converts to this type from the input type.
Source§

impl From<BoardRecord> for BoardConfiguration

Source§

fn from(record: BoardRecord) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BoardConfiguration

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BoardConfiguration

Source§

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.

Source§

impl StructuralPartialEq for BoardConfiguration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.