Skip to main content

CapacityWarningKind

Enum CapacityWarningKind 

Source
pub enum CapacityWarningKind {
    Overflow,
    Conversion(WipDiagnosticKind),
    Scope(ScopeDiagnosticKind),
}
Expand description

What one shared capacity finding is about (data-model §5).

The kind is the machine-readable half, so a surface can branch on the condition while the sentence beside it stays a sentence. Two of the three variants carry the registry that already owns the condition rather than restating it; see the module docs.

Variants§

§

Overflow

The scope’s committed work exceeds its configured ceiling (C-006).

§

Conversion(WipDiagnosticKind)

One issue’s estimate could not be counted in the calculation’s unit: the WIP mission’s own estimate vocabulary, verbatim.

§

Scope(ScopeDiagnosticKind)

One reference did not resolve, or resolved twice: WP02’s own scope vocabulary, verbatim.

Implementations§

Source§

impl CapacityWarningKind

Source

pub const fn as_str(self) -> &'static str

The stable spelling every surface prints and every payload carries.

Delegates to the registry that owns the condition, so missing_conversion here and missing_conversion in tix wip are the same string with the same meaning.

Source

pub const fn default_remedy(self) -> Option<&'static str>

What the reader can do about it — the remedy half of the #1643 shape.

The table lives here so all four surfaces say the same thing (C-007): “committed 25d exceeds the capacity of 20d” tells a reader what happened, “raise the ceiling, move work, or reduce the scope” tells them what to do. A kind this build has no remedy for returns None, and the warning then falls back to the registry’s own sentence when it carried one.

Trait Implementations§

Source§

impl Clone for CapacityWarningKind

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 Copy for CapacityWarningKind

Source§

impl Debug for CapacityWarningKind

Source§

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

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

impl Eq for CapacityWarningKind

Source§

impl Hash for CapacityWarningKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CapacityWarningKind

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 CapacityWarningKind

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.