Package-level declarations
Types
Link copied to clipboard
A thread-safe wrapper for one-time events that should be consumed only once, even when observed multiple times.
Link copied to clipboard
interface StringDecoder
Interface representing a string decoder.
Link copied to clipboard
Implementation of StringDecoder that uses Android's Uri.decode method for decoding strings.
Link copied to clipboard
Functions
Link copied to clipboard
inline fun <ResultType, RequestType> networkBoundResource(crossinline query: () -> Flow<ResultType>, crossinline fetch: suspend () -> RequestType, crossinline saveFetchedResult: suspend (RequestType) -> Unit, crossinline shouldFetch: (ResultType) -> Boolean = { true }): Flow<Resource<ResultType>>
Creates a network-bound resource flow that implements the offline-first pattern.
Link copied to clipboard
inline suspend fun <T> suspendCoroutineWithTimeout(timeMillis: Long, crossinline block: (CancellableContinuation<T>) -> Unit): T
Suspends the current coroutine with a timeout in milliseconds, useful for operations that need time-based cancellation.
inline suspend fun <T> suspendCoroutineWithTimeout(timeout: Duration, crossinline block: (Continuation<T>) -> Unit): T
Suspends the current coroutine with a timeout, useful for operations that need time-based cancellation.
Link copied to clipboard