pub trait TaskFactory:
Send
+ Sync
+ 'static {
// Required method
fn build(&self, ctx: TaskContext) -> BoxTaskFuture;
}Expand description
Factory that creates a fresh task future for each attempt.
Required Methods§
Sourcefn build(&self, ctx: TaskContext) -> BoxTaskFuture
fn build(&self, ctx: TaskContext) -> BoxTaskFuture
Builds a new task future.
§Arguments
ctx: Per-attempt context with cancellation, heartbeat, and readiness.
§Returns
Returns a boxed future that resolves to TaskResult.