awaitItem

abstract suspend fun awaitItem(): T

Assert that the next event received was an item and return it. This function will suspend if no events have been received.

When this ReceiveTurbine is in a terminal state (Event.Complete or Event.Error), this method will yield the same result every time it is called.

Throws

if the next event was completion or an error.