Skip to main content

Applicability

Enum Applicability 

Source
pub enum Applicability {
    Applicable,
    Undecided {
        decision: Key,
        option: String,
    },
    NotSelected {
        decision: Key,
        option: String,
        selected: String,
    },
    AwaitingChoice {
        predecessor: Key,
    },
    Stranded {
        dependency: DependencyId,
        predecessor: Key,
    },
    EmptyJoin,
    AllChildrenExcluded {
        decisions: Vec<Key>,
    },
    ChildrenStranded {
        child: Key,
    },
}
Expand description

Whether work belongs to the active execution graph, derived from decisions and constraints.

Only Applicable work can take lifecycle transitions or enter the remaining schedule. The state is recomputed from authoritative decisions, conditions, join policies and unwaived constraints; it is never persisted.

Variants§

§

Applicable

Every condition names the selected option and every prerequisite can proceed.

§

Undecided

A condition on the work or a containing package awaits an open decision.

Fields

§decision: Key

Decision that has not selected an option.

§option: String

Option the work requires.

§

NotSelected

A decision selected a different option than a condition on the work or a container.

Fields

§decision: Key

Decision that excluded the work.

§option: String

Option the work requires.

§selected: String

Option the decision selected.

§

AwaitingChoice

A prerequisite is undecided or itself waits for a choice, so the work’s place in the plan is not yet committed. For a work package with no applicable child, the prerequisite is a child that still waits for a choice.

Fields

§predecessor: Key

Prerequisite, or package child, whose applicability is still unknown.

§

Stranded

An ordinary constraint from not-selected work, or from work that can never proceed, never releases; only a reviewed plan change can let this work proceed.

Fields

§dependency: DependencyId

Constraint that can never be released.

§predecessor: Key

Predecessor of that constraint.

§

EmptyJoin

Every branch into an active-branch join was excluded and the join does not permit that.

§

AllChildrenExcluded

Every child of this work package was excluded by a choice, so the package is excluded as well: it holds no work that could complete it.

Fields

§decisions: Vec<Key>

Decisions whose selected options excluded the children, in key order.

§

ChildrenStranded

No child of this work package is applicable and at least one that a choice did not exclude is stranded or an empty join, so the package can never complete without a plan change.

Fields

§child: Key

First such child, in key order.

Implementations§

Source§

impl Applicability

Source

pub fn is_applicable(&self) -> bool

Whether the work belongs to the active graph.

Source

pub fn is_not_selected(&self) -> bool

Whether a choice excluded the work from the plan’s scope, directly or through every child of a work package.

Source

pub fn condition_selected(&self) -> bool

Whether the work’s own conditions are selected, so its lifecycle may count as completion.

Trait Implementations§

Source§

impl Clone for Applicability

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 Applicability

Source§

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

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

impl<'de> Deserialize<'de> for Applicability

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 Applicability

Source§

impl PartialEq for Applicability

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 Applicability

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Applicability

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<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> Same for T

Source§

type Output = T

Should always be Self
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.