pub struct ExecutionResult {
pub proceed: bool,
pub outcome_value: Option<Value>,
pub sleep_for: Option<Duration>,
pub persistence_data: Option<Value>,
pub event_name: Option<String>,
pub event_key: Option<String>,
pub event_as_of: Option<DateTime<Utc>>,
pub branch_values: Option<Vec<Value>>,
pub poll_endpoint: Option<PollEndpointConfig>,
pub output_data: Option<Value>,
}Expand description
Executionresult.
Fields§
§proceed: boolWhether the workflow should proceed to the next step.
outcome_value: Option<Value>Outcome value for decision-based routing.
sleep_for: Option<Duration>Duration to sleep before re-executing.
persistence_data: Option<Value>Step-specific state to persist between executions.
event_name: Option<String>Event name to wait for.
event_key: Option<String>Event key to match.
event_as_of: Option<DateTime<Utc>>Only consider events published after this time.
branch_values: Option<Vec<Value>>Values to branch execution on (for ForEach/Parallel).
poll_endpoint: Option<PollEndpointConfig>Poll endpoint configuration for external service polling.
output_data: Option<Value>Output data to merge into workflow.data after step completion.
Implementations§
Source§impl ExecutionResult
impl ExecutionResult
Sourcepub fn outcome(value: impl Into<Value>) -> Self
pub fn outcome(value: impl Into<Value>) -> Self
Continue with an outcome value for decision routing.
Sourcepub fn branch(values: Vec<Value>, persistence_data: Option<Value>) -> Self
pub fn branch(values: Vec<Value>, persistence_data: Option<Value>) -> Self
Create child branches for parallel/foreach execution.
Sourcepub fn sleep(duration: Duration, persistence_data: Option<Value>) -> Self
pub fn sleep(duration: Duration, persistence_data: Option<Value>) -> Self
Sleep for a duration before re-executing.
Sourcepub fn wait_for_event(
event_name: impl Into<String>,
event_key: impl Into<String>,
as_of: DateTime<Utc>,
) -> Self
pub fn wait_for_event( event_name: impl Into<String>, event_key: impl Into<String>, as_of: DateTime<Utc>, ) -> Self
Wait for an external event.
Sourcepub fn poll_endpoint(config: PollEndpointConfig) -> Self
pub fn poll_endpoint(config: PollEndpointConfig) -> Self
Poll an external endpoint until a condition is met.
Trait Implementations§
Source§impl Clone for ExecutionResult
impl Clone for ExecutionResult
Source§fn clone(&self) -> ExecutionResult
fn clone(&self) -> ExecutionResult
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 Debug for ExecutionResult
impl Debug for ExecutionResult
Source§impl Default for ExecutionResult
impl Default for ExecutionResult
Source§fn default() -> ExecutionResult
fn default() -> ExecutionResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExecutionResult
impl<'de> Deserialize<'de> for ExecutionResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionResult
impl RefUnwindSafe for ExecutionResult
impl Send for ExecutionResult
impl Sync for ExecutionResult
impl Unpin for ExecutionResult
impl UnsafeUnpin for ExecutionResult
impl UnwindSafe for ExecutionResult
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