Iterator for ReceiveChannel. Instances of this interface are not thread-safe and shall not be used from concurrent coroutines.
Returns true if the channel has more elements, suspending the caller while this channel is empty, or returns false if the channel is closed for receive without a cause. It throws the original close cause exception if the channel has failed.
Retrieves the element removed from the channel by a preceding call to hasNext, or throws an IllegalStateException if hasNext was not invoked. This method should only be used in pair with hasNext: