SuspendingTextChunkSource

An asynchronous, pull-based producer of text chunks.

Empty chunks are permitted and null alone denotes end of input.

Functions

Link copied to clipboard
open suspend fun close()

Releases source resources; the default implementation does nothing.

Link copied to clipboard
abstract suspend fun readChunk(): String?

Returns the next possibly empty chunk, or null when no input remains.