Companion

object Companion

Functions

Link copied to clipboard
inline fun <T : Any> collect(noinline onResult: (result: T?, error: Throwable?) -> Unit, collectionCount: Int? = null, dispatcher: CoroutineDispatcher = Dispatchers.Default): DataCollector<T>

Creates and starts an DataCollector for continuous or a specific number of collections.

Link copied to clipboard
inline fun <T : Any> collectSingle(noinline onResult: (result: T?, error: Throwable?) -> Unit, dispatcher: CoroutineDispatcher = Dispatchers.Default): DataCollector<T>

Creates and starts an DataCollector that collects exactly one time.