arrow-effects-reactor-data / arrow.effects.reactor / MonoK

MonoK

@higherkind data class MonoK<A> : MonoKOf<A>, MonoKKindedJ<A>

Constructors

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

Properties

mono val mono: Mono<A>

Functions

ap fun <B> ap(fa: MonoKOf<(A) -> B>): MonoK<B>
bracketCase fun <B> bracketCase(use: (A) -> MonoKOf<B>, release: (A, ExitCase<Throwable>) -> MonoKOf<Unit>): MonoK<B>
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.
continueOn fun continueOn(ctx: CoroutineContext): MonoK<A>
equals fun equals(other: Any?): Boolean
flatMap fun <B> flatMap(f: (A) -> MonoKOf<B>): MonoK<B>
handleErrorWith fun handleErrorWith(function: (Throwable) -> MonoK<A>): MonoK<A>
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>

Companion Object Functions

async fun <A> async(fa: MonoKProc<A>): MonoK<A>
Creates a MonoK that’ll run MonoKProc.
asyncF fun <A> asyncF(fa: MonoKProcF<A>): 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

fix fun <A> MonoKOf<A>.fix(): MonoK<A>
value fun <A> MonoKOf<A>.value(): Mono<A>