Package-level declarations

Types

Link copied to clipboard
class DebugException(message: String) : Exception
Link copied to clipboard
sealed class Resource<out T>

Properties

Link copied to clipboard
Link copied to clipboard
const val DEBUG_PRINT: String

Functions

Link copied to clipboard
inline fun debugAssert(assert: () -> Boolean, message: () -> String)
Link copied to clipboard
inline fun debugException(message: () -> String)
Link copied to clipboard
inline fun debugPrint(tag: String = DEBUG_PRINT, message: () -> String)
Link copied to clipboard
inline fun debugWarning(message: () -> String)
inline fun debugWarning(assert: () -> Boolean, message: () -> String)
Link copied to clipboard
Link copied to clipboard
fun Throwable.getStackTracePretty(showMessage: Boolean = true): String
Link copied to clipboard
fun CoroutineScope.launchSafe(context: CoroutineContext = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
fun logError(throwable: Throwable)
Link copied to clipboard
fun <T> normalSafeApiCall(apiCall: () -> T): T?
Link copied to clipboard
fun <T> LifecycleOwner.observe(liveData: LiveData<T>, action: (t: T) -> Unit)

NOTE: Only one observer at a time per value

Link copied to clipboard
fun <T> LifecycleOwner.observeNullable(liveData: LiveData<T>, action: (t: T) -> Unit)

NOTE: Only one observer at a time per value

Link copied to clipboard
suspend fun <T> safeApiCall(apiCall: suspend () -> T): Resource<T>
Link copied to clipboard
fun <T> safeFail(throwable: Throwable): Resource<T>
Link copied to clipboard
suspend fun <T> suspendSafeApiCall(apiCall: suspend () -> T): T?
Link copied to clipboard