Protocol used for evaluating waitable expressions against waiting conditions to determine if waiting should continue or halt with a final value.
Summary
Types
The caller's compile-time environment, threaded through for telemetry and error reporting.
All the types that implement this protocol.
Functions
Evaluates the waitable expression to provide its value, or to continue to wait.
Provides the final value of the waitable expression in the event of a timeout.
Types
@type env() :: Macro.Env.t() | nil
The caller's compile-time environment, threaded through for telemetry and error reporting.
It is nil for the functional WaitForIt.until/2 API, which has no Macro.Env.
@type t() :: term()
All the types that implement this protocol.
@type value() :: any()
@type wait_type() :: atom()
Functions
Evaluates the waitable expression to provide its value, or to continue to wait.
It should return {:halt, value} if the wait is over and the final value of the waitable
expression has been determined, or {:cont, value} if waiting should continue.
Provides the final value of the waitable expression in the event of a timeout.