Package-level declarations

Types

Link copied to clipboard

In coroutines, we need special dispatchers for a scope, and in a large project to manage these dispatchers in the main source and test source, we can use the implementation of this interface.

Link copied to clipboard

Standard dispatcher implementation of DispatchersProvider with CoroutineDispatcher.

Link copied to clipboard

Test dispatcher implementation of DispatchersProvider with StandardTestDispatcher.

Functions

Link copied to clipboard
inline suspend fun suspendedTryCatchBool(context: CoroutineContext = Dispatchers.Default, crossinline block: suspend () -> Boolean): Boolean

suspendedTryCatchBool used when you want to return a boolean value or return false if an exception is thrown in suspend functions.

Link copied to clipboard
inline suspend fun suspendedTryCatchBoolean(context: CoroutineContext = Dispatchers.Default, crossinline block: suspend () -> Unit): Boolean

suspendedTryCatchBoolean used when you want to return false if an exception is thrown in suspend functions.

Link copied to clipboard
inline suspend fun <T> suspendedTryCatchElse(context: CoroutineContext = Dispatchers.Default, crossinline elseBlock: suspend () -> T, crossinline block: suspend () -> T): T

suspendedTryCatchElse used when you want to return a default value if an exception is thrown in suspend functions.

Link copied to clipboard
inline suspend fun <T> suspendedTryCatchIgnore(context: CoroutineContext = Dispatchers.Default, crossinline block: suspend () -> T)

suspendedTryCatchIgnore used when you want to ignore catch block if an exception is thrown in suspend functions.

Link copied to clipboard
inline suspend fun <T> suspendedTryCatchNull(context: CoroutineContext = Dispatchers.Default, crossinline block: suspend () -> T): T?

suspendedTryCatchNull used when you want to return null if an exception is thrown in suspend functions.