pub async fn steer_all<'a, I, F>(children: I, message: F) -> Vec<ChildSteering>Expand description
Steers each of children at once, with a message made by message for
each (a message needs its own id, so the closure is called once per
child), and returns what became of each, in the order given.
Waits for every child: each send is bounded by the client’s own timeout, one that fails or is refused does not stop the others, and the caller learns the whole outcome at once, which is what a fan-out of corrections is for. A child not yet named is reported as such, with nothing sent. ADR 0033’s group of delegations will wrap this.
use a2a_protocol_client::delegation::{Delegation, steer_all};
use a2a_protocol_types::Message;
let outcomes = steer_all(&children, || {
Message::user_text(uuid::Uuid::new_v4().to_string(), "stop at the first match")
})
.await;
for child in outcomes {
println!("{:?}: {:?}", child.task_id, child.result.is_ok());
}