blocking_await_promise_json

Function blocking_await_promise_json 

Source
pub fn blocking_await_promise_json<T: DeserializeOwned>(
    promise_id: &PromiseId,
) -> Result<T, Error>
Expand description

Awaits a promise blocking the execution of the agent. The agent is going to be suspended until the promise is completed.

The completed promise’s payload is decoded as JSON.

Use await_promise_json for an async version of this function, allowing to interleave awaiting of the promise with other operations.