Skip to main content

ColumnUsage

Struct ColumnUsage 

Source
pub struct ColumnUsage {
    pub column: String,
    pub items: u32,
    pub estimate: Option<u32>,
    pub limit: Option<ColumnLimit>,
}
Expand description

One column’s usage, and the limit it is measured against.

Fields§

§column: String

The column’s name, as the board declares it.

§items: u32

How many issues the column holds.

§estimate: Option<u32>

The estimate total in the limit’s unit.

None when the board states no estimate ceiling for the column (there is no unit to count in) or when at least one issue’s estimate could not be counted — the snapshot’s diagnostics say which issue, and ColumnUsage::state is then LimitState::Unknown.

§limit: Option<ColumnLimit>

The enabled limit in force for the column, if any.

Implementations§

Source§

impl ColumnUsage

Source

pub fn max_items(&self) -> Option<u32>

The item ceiling, when the column has one.

Source

pub fn max_estimate(&self) -> Option<u32>

The estimate ceiling, when the column has one.

Source

pub fn unit(&self) -> Option<&str>

The unit the estimate ceiling counts in, when there is one.

Source

pub fn policy(&self) -> Option<LimitPolicy>

The policy the column enforces, when it enforces one.

Source

pub fn item_state(&self) -> LimitState

Where the column stands on its own item ceiling.

Source

pub fn estimate_state(&self) -> LimitState

Where the column stands on its own estimate ceiling.

Source

pub fn state(&self) -> LimitState

Where the column stands overall: the worse of its two ceilings.

Source

pub fn prospective(&self, add_items: u32, add_estimate: u32) -> LimitState

The state the column would be in after add_items more cards and add_estimate more of its unit (T009).

This is the before/after shape a move is judged with: the caller passes what the move would add, and reads the answer without touching a file. A move that adds nothing reproduces state exactly.

Source

pub fn cell(&self) -> String

The usage as one short cell: 4/5, or 4 when the column has no item ceiling, with the estimate ceiling beside it in its unit (12/20d) when the board states one. A trailing ! means something is over, or unknown.

It is deliberately the usage, not a verdict: the verdict is the policy layer’s, and a cell that said “block” would be a claim this module is not entitled to make.

Trait Implementations§

Source§

impl Clone for ColumnUsage

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 ColumnUsage

Source§

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

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

impl Eq for ColumnUsage

Source§

impl PartialEq for ColumnUsage

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 StructuralPartialEq for ColumnUsage

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