Struct issue_states::state::IssueState
source · pub struct IssueState<C>where
C: Condition + Sized,{
pub conditions: Vec<C>,
pub relations: StateRelations<C>,
/* private fields */
}
Expand description
Representaiton of an issue state
An issue state is a named transient property depending on an issue’s
metadata. For a given issue, a state is either enabled or disabled based on
the Conditions
attached to state. Additionally, a state may or may not be
related to other issues. Those relations affect whether a state is selected
by a resolver for a given issue, provided that it is enabled for saif issue.
Fields§
§conditions: Vec<C>
Metadata conditions of the state
relations: StateRelations<C>
Relations to ther states
Implementations§
source§impl<C> IssueState<C>where
C: Condition + Sized,
impl<C> IssueState<C>where
C: Condition + Sized,
sourcepub fn add_extended<I>(&mut self, dependencies: I)where
I: IntoIterator<Item = Arc<IssueState<C>>>,
pub fn add_extended<I>(&mut self, dependencies: I)where
I: IntoIterator<Item = Arc<IssueState<C>>>,
Add states on which this state depends on
sourcepub fn add_overridden<I>(&mut self, overridden_by: I)where
I: IntoIterator<Item = Arc<IssueState<C>>>,
pub fn add_overridden<I>(&mut self, overridden_by: I)where
I: IntoIterator<Item = Arc<IssueState<C>>>,
Add states which will override this state
sourcepub fn conditions_satisfied(&self, issue: &C::Issue) -> bool
pub fn conditions_satisfied(&self, issue: &C::Issue) -> bool
Check whether all conditions of the state are satisfied for an issue
Note:
Conditions inherited from states extended by this state are not considered. Thus, this function alone can not be used for assessing whether the state is enabled or not.
Trait Implementations§
source§impl<C> Ord for IssueState<C>where
C: Condition,
impl<C> Ord for IssueState<C>where
C: Condition,
source§impl<C> PartialEq<IssueState<C>> for IssueState<C>where
C: Condition,
impl<C> PartialEq<IssueState<C>> for IssueState<C>where
C: Condition,
source§impl<C> PartialOrd<IssueState<C>> for IssueState<C>where
C: Condition,
impl<C> PartialOrd<IssueState<C>> for IssueState<C>where
C: Condition,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more