safelyWithResult

inline suspend fun <T> safelyWithResult(noinline block: suspend CoroutineScope.() -> T): Result<T>
inline suspend fun <T, R> T.safelyWithResult(noinline block: suspend T.() -> R): Result<R>