IssueStateSet

Struct IssueStateSet 

Source
pub struct IssueStateSet<C>
where C: Condition,
{ /* private fields */ }
Expand description

Set of issue states

This set of issue states is intended for the efficient computation of an issue’s state.

Implementations§

Source§

impl<C> IssueStateSet<C>
where C: Condition,

Source

pub fn from_set(states: BTreeSet<Arc<IssueState<C>>>) -> Result<Self>

Create an issue state set from a orderd set of issue states

§Note:

The set provided must be the (transitive) closure of all its elements regarding its relations to other sets: if a state is in the set, all states related to it must also be in the set. No explicit checking is performed to assert this property.

Source

pub fn iter(&self) -> Iter<'_, Arc<IssueState<C>>>

Get an iterator for iterating over the issue states within the set

This iterator will yield an issue state only after all its dependencies.

Trait Implementations§

Source§

impl<C> Default for IssueStateSet<C>
where C: Condition,

Source§

fn default() -> Self

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

impl<C> From<Vec<Arc<IssueState<C>>>> for IssueStateSet<C>
where C: Condition,

Create an issue state set directly from a vector

§Warning

Within the vector, the states must appear ordered by dependency: all dependencies of a state must appear before the state itself!

Source§

fn from(states: Vec<Arc<IssueState<C>>>) -> Self

Converts to this type from the input type.
Source§

impl<C> Resolvable<C> for IssueStateSet<C>
where C: Condition,

Source§

fn issue_state(&self, issue: &C::Issue) -> Result<Option<Arc<IssueState<C>>>>

Resolve the state for a given issue Read more

Auto Trait Implementations§

§

impl<C> Freeze for IssueStateSet<C>

§

impl<C> RefUnwindSafe for IssueStateSet<C>
where C: RefUnwindSafe,

§

impl<C> Send for IssueStateSet<C>
where C: Sync + Send,

§

impl<C> Sync for IssueStateSet<C>
where C: Sync + Send,

§

impl<C> Unpin for IssueStateSet<C>

§

impl<C> UnwindSafe for IssueStateSet<C>
where C: RefUnwindSafe,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.