Skip to main content

__interrupt_impl

Function __interrupt_impl 

Source
pub async fn __interrupt_impl(
    ctx: &InterruptContext,
    payload: Value,
    id: Option<&str>,
) -> Result<Value, JunctureError>
Expand description

Internal interrupt implementation

Called by the interrupt! macro. Examines the interrupt context to determine whether to resume with a previously provided value or to send an interrupt signal and return an error.

§Arguments

  • ctx - Interrupt context reference
  • payload - Interrupt payload as JSON value
  • id - Optional named interrupt ID

§Errors

Returns JunctureError::interrupted if this is the first execution (no resume value available). Returns the resume value if resuming.