arrow-fx-rx2 / arrow.fx.rx2 / SingleK

SingleK

data class SingleK<out A> : SingleKOf<A>

Constructors

<init> SingleK(single: Single<out A>)

Properties

single val single: Single<out A>

Functions

ap fun <B> ap(fa: SingleKOf<(A) -> B>): SingleK<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) -> SingleKOf<B>, release: (A, ExitCase<Throwable>) -> SingleKOf<Unit>): SingleK<B>
continueOn fun continueOn(ctx: CoroutineContext): SingleK<A>
equals fun equals(other: Any?): Boolean
flatMap fun <B> flatMap(f: (A) -> SingleKOf<B>): SingleK<B>
hashCode fun hashCode(): Int
map fun <B> map(f: (A) -> B): SingleK<B>
runAsync fun runAsync(cb: (Either<Throwable, A>) -> SingleKOf<Unit>): SingleK<Unit>
runAsyncCancellable fun runAsyncCancellable(cb: (Either<Throwable, A>) -> SingleKOf<Unit>): SingleK<Disposable>
suspended suspend fun suspended(): A

Companion Object Functions

async Creates a SingleK that’ll run SingleKProc.fun <A> async(fa: SingleKProc<A>): SingleK<A>
asyncF fun <A> asyncF(fa: SingleKProcF<A>): SingleK<A>
cancelable Creates a SingleK that’ll run a cancelable operation.fun <A> cancelable(fa: ((Either<Throwable, A>) -> Unit) -> CancelToken<ForSingleK>): SingleK<A>
cancelableF fun <A> cancelableF(fa: ((Either<Throwable, A>) -> Unit) -> SingleKOf<CancelToken<ForSingleK>>): SingleK<A>
defer fun <A> defer(fa: () -> SingleKOf<A>): SingleK<A>
invoke operator fun <A> invoke(fa: () -> A): SingleK<A>
just fun <A> just(a: A): SingleK<A>
raiseError fun <A> raiseError(t: Throwable): SingleK<A>
tailRecM tailrec fun <A, B> tailRecM(a: A, f: (A) -> SingleKOf<Either<A, B>>): SingleK<B>

Extension Functions

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

Companion Object Extension Functions

concurrent fun SingleK.Companion.concurrent(dispatchers: Dispatchers<ForSingleK> = SingleK.dispatchers()): Concurrent<ForSingleK>
fx fun <A> SingleK.Companion.fx(c: suspend ConcurrentSyntax<ForSingleK>.() -> A): SingleK<A>

Do you like Arrow?

Arrow Org
<