extensions

de.rmgk.delay$.extensions$
object extensions

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Extensions

Extensions

extension [Ctx, A](async: Async[Ctx, A])
inline def flatMap[B](inline f: Ctx ?=> A => Async[Ctx, B]): Async[Ctx, B]
inline def map[B](inline f: Ctx ?=> A => B): Async[Ctx, B]
inline def provide[Outer](inline part: Outer ?=> Ctx): Async[Outer, A]
inline def recover(inline f: Ctx ?=> Throwable => Async[Ctx, A]): Async[Ctx, A]

replaces the async execution with some other async execution in case fo an exception

replaces the async execution with some other async execution in case fo an exception

Attributes

inline def run(using inline ctx: Ctx)(inline cb: Callback[A]): Unit

Start the underlying computation and pass the result to cb.

Start the underlying computation and pass the result to cb.

Attributes

inline def runToAsync(using inline ctx: Ctx): Async[Ctx, A]

Start the underlying computation immediately. The result is cached and can be accessed as Async

Start the underlying computation immediately. The result is cached and can be accessed as Async

Attributes

inline def runToFuture(using inline ctx: Ctx): Future[A]

Start the underlying computation immediately. Return a Future of the result.

Start the underlying computation immediately. Return a Future of the result.

Attributes

inline def transform[B](inline f: Ctx ?=> Try[A] => Async[Ctx, B]): Async[Ctx, B]
extension [T](cs: CompletionStage[T])
inline def toAsync: Async[Any, T]
extension [A](fut: Future[A])
inline def toAsync(using inline ec: ExecutionContext): Async[Any, A]
extension [Ctx, A](sync: Sync[Ctx, A])
inline def flatMap[B](inline f: A => Sync[Ctx, B]): Sync[Ctx, B]
inline def map[B](inline f: A => B): Sync[Ctx, B]
inline def run(using inline ctx: Ctx): A

Executes the Sync given a Ctx.

Executes the Sync given a Ctx.

Attributes