pub async fn callback_handler<T>(
state: &Arc<ExecutionState>,
op_id: &OperationIdentifier,
config: &CallbackConfig,
logger: &Arc<dyn Logger>,
) -> Result<Callback<T>, DurableError>where
T: Serialize + DeserializeOwned,Expand description
Creates a callback and returns a Callback handle.
This handler implements the callback creation semantics:
- Generates a unique callback_id via checkpoint
- Creates a Callback struct with result() method
- Handles timeout and heartbeat configuration
§Arguments
state- The execution state for checkpointingop_id- The operation identifierconfig- Callback configuration (timeout, heartbeat)logger- Logger for structured logging
§Returns
A Callback handle that can be used to wait for the result.