pub enum TaskState {
Open,
Claimed,
Completed,
Expired,
Escalated,
Withdrawn,
}Expand description
The BPMN-shaped lifecycle, minus the states this runtime has no use for.
Variants§
Open
Visible to its candidate roles; nobody has taken it.
Claimed
Reserved by one person, who is expected to decide.
Completed
Decided.
Expired
The window passed. What happens next was declared up front, not decided in the moment.
Escalated
Passed to a wider or higher audience.
Withdrawn
Its run concluded closed before anybody answered, so there is nothing left to decide.
Implementations§
Source§impl TaskState
impl TaskState
pub fn as_str(self) -> &'static str
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
The inverse of as_str, written over
ALL for the reason CaseStatus::parse is.
Sourcepub const fn is_pending(self) -> bool
pub const fn is_pending(self) -> bool
Whether the task is still somebody’s to act on.
Wider than is_queued: a claimed task has left the
queue and is still a decision the plane is waiting on, so a backlog that
shrank the moment a reviewer opened something would report progress that
had not happened.
Sourcepub const fn is_queued(self) -> bool
pub const fn is_queued(self) -> bool
Whether the task is offered to a candidate who has not claimed it.
An escalated task is queued again: escalation releases the claim and widens the audience, which is only a remedy if somebody can then see it.
Sourcepub const fn awaits_expiry(self) -> bool
pub const fn awaits_expiry(self) -> bool
Whether the expiry sweep still owes this task anything.
Narrower than is_pending: an escalated task is
still claimable, but its expiry policy has already fired — see
TaskStore::overdue for what keeping it in that scan starves.
Trait Implementations§
impl Copy for TaskState
Source§impl<'de> Deserialize<'de> for TaskState
impl<'de> Deserialize<'de> for TaskState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TaskState
impl StructuralPartialEq for TaskState
Auto Trait Implementations§
impl Freeze for TaskState
impl RefUnwindSafe for TaskState
impl Send for TaskState
impl Sync for TaskState
impl Unpin for TaskState
impl UnsafeUnpin for TaskState
impl UnwindSafe for TaskState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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