pub struct Decision {
pub id: String,
pub blocked_by: Vec<String>,
pub reason: Option<String>,
pub recovery: Option<Recovery>,
pub question: Option<String>,
pub choices: Vec<String>,
}Expand description
The conductor’s decision for one task. Deliberately has no priority
field: see this module’s doc.
Fields§
§id: StringTask id, expected to be copied verbatim from what it was shown.
blocked_by: Vec<String>Ids this task should be blocked on. Meaningful only for a runnable
(queued) task; ignored otherwise.
reason: Option<String>One line explaining the block or the recovery.
recovery: Option<Recovery>Recovery for a stalled or finished task. For a runnable (queued)
one, only Recovery::Hold has any effect - and only when
blocked_by is empty, since a queued task with something to wait on
is handled by that field instead - holding a task the operator has
already said should not compete again without filing another
question that only restates the same answer. Requeue, Review,
and Done have no meaning for a task that is already in line.
question: Option<String>A question for the operator. When present, apply files it (unless
one is already open for this task) and blocks the task on its id
instead of acting on blocked_by or recovery.
choices: Vec<String>Fixed answers for question, if it has any. Empty means free text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Decision
impl<'de> Deserialize<'de> for Decision
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>,
Auto Trait Implementations§
impl Freeze for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnsafeUnpin for Decision
impl UnwindSafe for Decision
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
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<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