syntax

de.rmgk.delay$.syntax$
object syntax

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
syntax.type

Members list

Extensions

Extensions

extension [Ctx, A](async: Async[Ctx, A])(inline async: Async[Ctx, A])
inline def flatMap[B](inline f: Ctx ?=> A => Async[Ctx, B]): Async[Ctx, B]

Transform successes. Propagate failures.

Transform successes. Propagate failures.

Attributes

inline def map[B](inline f: Ctx ?=> A => B): Async[Ctx, B]

Transform successes. Propagate failures.

Transform successes. Propagate failures.

Attributes

inline def provide[Outer](inline part: Outer ?=> Ctx): Async[Outer, A]

Provides a new context to the async.

Provides a new context to the async.

Attributes

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]

Allows to handle both success and failure cases. More or less a generalized version of flatMap

Allows to handle both success and failure cases. More or less a generalized version of flatMap

Attributes

extension [T](cs: CompletionStage[T])(inline cs: CompletionStage[T])
inline def toAsync: Async[Any, T]
extension [A](fut: Future[A])(inline fut: Future[A])
inline def toAsync(using inline ec: ExecutionContext): Async[Any, A]
extension [Ctx, A](sync: Sync[Ctx, A])(inline 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