Package kotlinx.coroutines.stream

Functions

Link copied to clipboard
fun <T> Stream<T>.consumeAsFlow(): Flow<T>

Represents the given stream as a flow and closes the stream afterwards. The resulting flow can be collected only once and throws IllegalStateException when trying to collect it more than once.