Package-level declarations

Types

Link copied to clipboard
@RequiresOptIn(message = "This is an internal API for the data module. Do not use it in other modules.", level = RequiresOptIn.Level.ERROR)
annotation class InternalDataApi

dataモジュール内部での利用を意図したAPIであることを示すマーカーアノテーション。 このアノテーションが付いたAPIを他のモジュールで利用するには、

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface Resource<out D, out E>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <D> Resource<D, *>.dataOrNull(): D?
Link copied to clipboard
inline fun <D, E, R> Resource<D, E>.fold(onSuccess: (D) -> R, onError: (E) -> R): R
Link copied to clipboard
inline fun <D, E> Resource<D, E>.onError(onError: (E) -> Unit): Resource<D, E>
Link copied to clipboard
inline fun <D, E> Resource<D, E>.onSuccess(onSuccess: (D) -> Unit): Resource<D, E>