Package-level declarations

Types

Link copied to clipboard
class OneTimeEvent<T>(content: T)

A wrapper for data that is exposed via a LiveData that represents an event.

Link copied to clipboard
sealed class Resource<T>

A sealed class that represents the result of a resource operation.

Link copied to clipboard
interface StringDecoder

Interface representing a string decoder.

Link copied to clipboard
class UriDecoder @Inject constructor : StringDecoder

Implementation of StringDecoder that uses Android's Uri.decode method for decoding strings.

Link copied to clipboard
@DaggerGenerated
@Generated(value = "dagger.internal.codegen.ComponentProcessor", comments = "https://dagger.dev")
class UriDecoder_Factory : Factory<T>
@DaggerGenerated
@Generated(value = "dagger.internal.codegen.ComponentProcessor", comments = "https://dagger.dev")
class UriDecoder_Factory : Factory<T>

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 performs a query and fetches new data if necessary.

Link copied to clipboard
inline suspend fun <T> suspendCoroutineWithTimeout(timeMillis: Long, crossinline block: (CancellableContinuation<T>) -> Unit): T
inline suspend fun <T> suspendCoroutineWithTimeout(timeout: Duration, crossinline block: (Continuation<T>) -> Unit): T

Suspends the current coroutine until the specified block is completed or the timeout is reached.

Link copied to clipboard
inline suspend fun <T> suspendRunCatching(crossinline block: suspend () -> T): Result<T>

Runs the specified block and returns the result as a Result.