pub async fn await_promise_json<T: DeserializeOwned>(
promise_id: &PromiseId,
) -> Result<T, Error>Expand description
Awaits a promise.
The completed promise’s payload is decoded as JSON.
If only promises or timeouts are awaited simultaneously, the agent is going to be suspended until any of them completes.