Accumulator Flow
This Flow will have behaviour very similar to SharedFlow, but there are several differences:
All unhandled by FlowCollector data will not be removed from AccumulatorFlow and will be sent to new FlowCollectors until anybody will handle it
Here there are an activeData where data T will be stored until somebody will handle it
Constructors
Functions
Extensions
Link copied to clipboard
Creates AccumulatorFlow using this as base Flow
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Flow<List<T>>.asMutableComposeListState(scope: CoroutineScope): <Error class: unknown class><T>
Link copied to clipboard
fun <T> Flow<T>.asMutableComposeState(initial: T, scope: CoroutineScope): <Error class: unknown class><T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Flow<Int>.mapRequireFilling(minimalLeftItems: Int, crossinline countGetter: () -> Int): Flow<Int>
Link copied to clipboard
Link copied to clipboard
inline fun <T> Flow<T>.subscribeSafely(scope: CoroutineScope, noinline onException: ExceptionHandler<Unit> = defaultSafelyExceptionHandler, noinline block: suspend (T) -> Unit): Job
Use subscribe, but all blocks will be called inside of safely function. Use onException to set up your reaction for Throwables
Link copied to clipboard
inline fun <T, M> Flow<T>.subscribeSafelyAsync(scope: CoroutineScope, noinline markerFactory: suspend (T) -> M, noinline onException: ExceptionHandler<Unit> = defaultSafelyExceptionHandler, noinline block: suspend (T) -> Unit): Job
Link copied to clipboard
inline fun <T> Flow<T>.subscribeSafelySkippingExceptions(scope: CoroutineScope, noinline block: suspend (T) -> Unit): Job
Use subscribeSafelyWithoutExceptions, but all exceptions inside of safely will be skipped
Link copied to clipboard
Link copied to clipboard
inline fun <T> Flow<T>.subscribeSafelyWithoutExceptions(scope: CoroutineScope, noinline onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull, noinline block: suspend (T) -> Unit): Job
Use subscribeSafelyWithoutExceptions, but all exceptions will be passed to defaultSafelyExceptionHandler
Link copied to clipboard
inline fun <T, M> Flow<T>.subscribeSafelyWithoutExceptionsAsync(scope: CoroutineScope, noinline markerFactory: suspend (T) -> M, noinline onException: ExceptionHandler<T?> = defaultSafelyWithoutExceptionHandlerWithNull, noinline block: suspend (T) -> Unit): Job
Link copied to clipboard
Link copied to clipboard