HH\Asio\wrap

Wrap an Awaitable into an Awaitable of ResultOrExceptionWrapper

namespace HH\Asio;

function wrap<Tv>(
  Awaitable<Tv> $awaitable,
): Awaitable<ResultOrExceptionWrapper<Tv>>;

The actual ResultOrExceptionWrapper in the returned Awaitable will only be available after you await or join the returned Awaitable.

Parameters

Returns