asDeferred

val <T> T.asDeferred: Deferred<T>(source)

Wraps this value in a completed Deferred. The resulting Deferred is immediately completed with this value. Useful for converting synchronous values to Deferred in contexts that expect deferred values.

Return

A Deferred that is already completed with this value

Type Parameters

T

The type of the value