pub struct BarrierNode<S: WorkflowState = State> {
pub name: String,
pub timeout: Option<Duration>,
pub default_action: BarrierDefaultAction,
pub reject_key: String,
pub approve_key: String,
/* private fields */
}Expand description
Human-in-the-loop 审批节点。
Fields§
§name: String§timeout: Option<Duration>§default_action: BarrierDefaultAction§reject_key: String§approve_key: StringImplementations§
Source§impl<S: WorkflowState<Effect = StateEffect>> BarrierNode<S>
impl<S: WorkflowState<Effect = StateEffect>> BarrierNode<S>
pub fn new(name: impl Into<String>) -> Self
pub fn timeout(self, timeout: Duration) -> Self
pub fn default_action(self, action: BarrierDefaultAction) -> Self
pub fn reject_key(self, key: impl Into<String>) -> Self
pub fn approve_key(self, key: impl Into<String>) -> Self
pub fn apply_decision_to_ctx( &self, ctx: &mut NodeContext<'_, S>, decision: BarrierDecision, )
Trait Implementations§
Source§impl<S: Clone + WorkflowState> Clone for BarrierNode<S>
impl<S: Clone + WorkflowState> Clone for BarrierNode<S>
Source§fn clone(&self) -> BarrierNode<S>
fn clone(&self) -> BarrierNode<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug + WorkflowState> Debug for BarrierNode<S>
impl<S: Debug + WorkflowState> Debug for BarrierNode<S>
Source§impl<S: WorkflowState> FlowNode<S> for BarrierNode<S>
impl<S: WorkflowState> FlowNode<S> for BarrierNode<S>
Auto Trait Implementations§
impl<S> Freeze for BarrierNode<S>
impl<S> RefUnwindSafe for BarrierNode<S>where
S: RefUnwindSafe,
impl<S> Send for BarrierNode<S>
impl<S> Sync for BarrierNode<S>
impl<S> Unpin for BarrierNode<S>where
S: Unpin,
impl<S> UnsafeUnpin for BarrierNode<S>
impl<S> UnwindSafe for BarrierNode<S>where
S: UnwindSafe,
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