Represents a suspension result which immediately has either a result or an error value.

Static methods

staticwithError<T>(error:T):ImmediateSuspensionResult<T>

Creates a new ImmediateSuspensionResult instance with error error.

staticwithResult<T>(result:T):ImmediateSuspensionResult<T>

Creates a new ImmediateSuspensionResult instance with result result.

Methods

Inherited Variables

Defined by SuspensionResult

error:Exception

The error value of the coroutine, is any.

result:T

The result value of the coroutine, if any.

state:SuspensionState

The current state of the suspension.

Inherited Methods

Defined by SuspensionResult