pub enum ApprovalOutcome {
Approved,
Rejected {
reason: String,
},
}Expand description
Decision applied to an approval gate by a StepInterceptor.
§Examples
use ironflow_engine::executor::ApprovalOutcome;
let granted = ApprovalOutcome::Approved;
assert_eq!(granted, ApprovalOutcome::Approved);
let refused = ApprovalOutcome::Rejected { reason: "not on a Friday".to_string() };
assert_ne!(granted, refused);Variants§
Approved
The gate is granted; execution continues past it.
Rejected
The gate is refused; the run fails with EngineError::ApprovalRejected.
Implementations§
Source§impl ApprovalOutcome
impl ApprovalOutcome
Sourcepub fn reject(reason: &str) -> Self
pub fn reject(reason: &str) -> Self
Build an ApprovalOutcome::Rejected with the given reason.
§Examples
use ironflow_engine::executor::ApprovalOutcome;
let outcome = ApprovalOutcome::reject("budget freeze");
assert_eq!(
outcome,
ApprovalOutcome::Rejected { reason: "budget freeze".to_string() }
);Trait Implementations§
Source§impl Clone for ApprovalOutcome
impl Clone for ApprovalOutcome
Source§impl Debug for ApprovalOutcome
impl Debug for ApprovalOutcome
impl Eq for ApprovalOutcome
Source§impl PartialEq for ApprovalOutcome
impl PartialEq for ApprovalOutcome
impl StructuralPartialEq for ApprovalOutcome
Auto Trait Implementations§
impl Freeze for ApprovalOutcome
impl RefUnwindSafe for ApprovalOutcome
impl Send for ApprovalOutcome
impl Sync for ApprovalOutcome
impl Unpin for ApprovalOutcome
impl UnsafeUnpin for ApprovalOutcome
impl UnwindSafe for ApprovalOutcome
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
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§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
Compare self to
key and return true if they are equal.