Skip to main content

DelegationHandler

Type Alias DelegationHandler 

Source
pub type DelegationHandler = Arc<dyn Fn(AgentId, AgentId, TaskSpec) -> Pin<Box<dyn Future<Output = Result<Value>> + Send>> + Send + Sync>;
Expand description

Callback type invoked when a TaskDelegation message is received.

The dispatcher calls this with (from, to, task) and expects the handler to execute the work and return the result.

Aliased Typeยง

pub struct DelegationHandler { /* private fields */ }