arrow-fx-reactor / arrow.fx.reactor / MonoK

MonoK

data class MonoK<out A> : MonoKOf<A>

Constructors

<init> MonoK(mono: Mono<out A>)

Properties

mono val mono: Mono<out A>

Functions

ap fun <B> ap(fa: MonoKOf<(A) -> B>): MonoK<B>
bracketCase A way to safely acquire a resource and release in the face of errors and cancellation. It uses ExitCase to distinguish between different exit cases when releasing the acquired resource.fun <B> bracketCase(use: (A) -> MonoKOf<B>, release: (A, ExitCase<Throwable>) -> MonoKOf<Unit>): MonoK<B>
continueOn fun continueOn(ctx: CoroutineContext): MonoK<A>
equals fun equals(other: Any?): Boolean
flatMap fun <B> flatMap(f: (A) -> MonoKOf<B>): MonoK<B>
hashCode fun hashCode(): Int
map fun <B> map(f: (A) -> B): MonoK<B>
runAsync fun runAsync(cb: (Either<Throwable, A>) -> MonoKOf<Unit>): MonoK<Unit>
runAsyncCancellable fun runAsyncCancellable(cb: (Either<Throwable, A>) -> MonoKOf<Unit>): MonoK<Disposable>
suspended suspend fun suspended(): A?

Companion Object Functions

async fun <A> ~~async~~(fa: MonoKProc<A>): MonoK<A>
Constructor for wrapping uncancelable async operations. It’s safe to wrap unsafe operations in this constructorfun <A> async(fa: ((Either<Throwable, A>) -> Unit) -> Unit): MonoK<A>
asyncF fun <A> ~~asyncF~~(fa: MonoKProcF<A>): MonoK<A>
fun <A> asyncF(fa: ((Either<Throwable, A>) -> Unit) -> MonoKOf<Unit>): MonoK<A>
cancelable Creates a MonoK that’ll wraps/runs a cancelable operation.fun <A> cancelable(fa: ((Either<Throwable, A>) -> Unit) -> CancelToken<ForMonoK>): MonoK<A>
cancelableF fun <A> cancelableF(fa: ((Either<Throwable, A>) -> Unit) -> MonoKOf<CancelToken<ForMonoK>>): MonoK<A>
defer fun <A> defer(fa: () -> MonoKOf<A>): MonoK<A>
invoke operator fun <A> invoke(fa: () -> A): MonoK<A>
just fun <A> just(a: A): MonoK<A>
raiseError fun <A> raiseError(t: Throwable): MonoK<A>
tailRecM tailrec fun <A, B> tailRecM(a: A, f: (A) -> MonoKOf<Either<A, B>>): MonoK<B>

Extension Functions

handleErrorWith fun <A> MonoK<A>.handleErrorWith(function: (Throwable) -> MonoK<A>): MonoK<A>

Companion Object Extension Functions

fx fun <A> MonoK.Companion.fx(c: suspend AsyncSyntax<ForMonoK>.() -> A): MonoK<A>

Do you like Arrow?

Arrow Org
<