pub enum Expiry {
Deny,
Escalate {
to: Vec<String>,
},
ProceedUnattended,
}Expand description
What a skill declares should happen when nobody answers its task in time.
Each answer carries what it needs, so the ones that mean nothing cannot be
written: an escalation names who is added — a promise to widen an audience
with nobody to widen it to is a state flag wearing a control’s name — and
acting without a human is spelled ProceedUnattended,
so it is an explicit, greppable act rather than a variant somebody picked
off a list.
Variants§
Deny
Refuse the proposed action. The safe default.
Escalate
Widen the audience by these roles and keep waiting.
The task is then answered by a person or never. Needs at least one role and a bounded initial audience, both refused at the task otherwise.
ProceedUnattended
Act without a human when the window closes.
Implementations§
Source§impl Expiry
impl Expiry
Sourcepub fn escalate_to<R: Into<String>>(roles: impl IntoIterator<Item = R>) -> Self
pub fn escalate_to<R: Into<String>>(roles: impl IntoIterator<Item = R>) -> Self
Escalate to these roles.
Sourcepub fn escalate_roles(&self) -> &[String]
pub fn escalate_roles(&self) -> &[String]
The roles an escalation adds; empty for every other answer.
Trait Implementations§
impl Eq for Expiry
impl StructuralPartialEq for Expiry
Auto Trait Implementations§
impl Freeze for Expiry
impl RefUnwindSafe for Expiry
impl Send for Expiry
impl Sync for Expiry
impl Unpin for Expiry
impl UnsafeUnpin for Expiry
impl UnwindSafe for Expiry
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,
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