HH\Asio\wrap

Wrap an Awaitable into an Awaitable of ResultOrExceptionWrapper.

Description

function HH\Asio\wrap(
  Awaitable<Tv> $awaitable,
): Awaitable<HH\Asio\ResultOrExceptionWrapper<Tv>>

Wrap an Awaitable into an Awaitable of ResultOrExceptionWrapper.

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

Parameters

  • Awaitable<Tv> $awaitable - The Awaitable to wrap.

Return Values