pub enum TransientContext {
Stateful(Context),
Stateless(Context),
Diverging(ExitCode),
}
Expand description
A context labeled as either stateful or stateless, or diverging when neither is applicable, in which case the program must provide an exit code and exit gracefully.
This data structure is only used in the decision making in between steps, therefore it is transient.
A stateful context may affect all following steps by appearing in the ctx_states and arg-resume. On the other hand, a stateless context will still be collected by the playbook for any reason it may need it, then discarded before the next step begins.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransientContext
impl RefUnwindSafe for TransientContext
impl Send for TransientContext
impl Sync for TransientContext
impl Unpin for TransientContext
impl UnwindSafe for TransientContext
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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