Package com.lagradost.cloudstream3.mvvm

Types

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

Functions

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

Properties

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