ZAsync

zio.temporal.promise.ZAsync$
See theZAsync companion trait
object ZAsync

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZAsync.type

Members list

Concise view

Type members

Classlikes

sealed trait Cancel extends NoEffects

Attributes

Graph
Supertypes
trait NoEffects
class Object
trait Matchable
class Any
case class Cancelled(failure: CanceledFailure) extends Result[Cancel, Nothing]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Result[Cancel, Nothing]
class Object
trait Matchable
class Any
case class Failure(error: Throwable) extends Result[NoEffects, Nothing]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Result[NoEffects, Nothing]
class Object
trait Matchable
class Any
sealed trait NoEffects

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Cancel
trait Timeout
object Result

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
sealed trait Result[-C <: NoEffects, +A]

Represents ZAsync execution result

Represents ZAsync execution result

Attributes

A

value type

C

ZAsync effect (either NoEffects or Cancel or Timeout

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Cancelled
class Failure
class Success[A]
class TimedOut
case class Success[A](value: A) extends Result[NoEffects, A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Result[NoEffects, A]
class Object
trait Matchable
class Any
case class TimedOut(failure: TimeoutException) extends Result[Timeout, Nothing]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Result[Timeout, Nothing]
class Object
trait Matchable
class Any
sealed trait Timeout extends NoEffects

Attributes

Graph
Supertypes
trait NoEffects
class Object
trait Matchable
class Any

Value members

Concrete methods

def attempt[A](thunk: => A): ZAsync[A]

Suspends side effect execution within ZAsync

Suspends side effect execution within ZAsync

Attributes

A

value type

thunk

effectful side effect (which may throw exceptions)

Returns:

suspended promise

def collectAllDiscard(in: Iterable[ZAsync[Any]]): ZAsync[Unit]

Ensures sequence of promises are either finished successfully or failed

Ensures sequence of promises are either finished successfully or failed

Attributes

in

sequence of promises

Returns:

suspended promise

See also:

Promise.allOf

def fail(error: Throwable): ZAsync[Nothing]

Creates failed ZAsync

Creates failed ZAsync

Attributes

error

the error

Returns:

promise completed with error

def foreach[A, B](in: Option[A])(f: A => ZAsync[B]): ZAsync[Option[B]]

Similar to zio.ZIO.foreach for Option

Similar to zio.ZIO.foreach for Option

Attributes

f

value handler

in

optional value

Returns:

promise with collected result, None or failure

def foreach[A, B, Collection <: (Iterable)](in: Collection[A])(f: A => ZAsync[B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]]): ZAsync[Collection[B]]

Similar to zio.ZIO.foreach for collections

Similar to zio.ZIO.foreach for collections

Attributes

f

value handler

in

sequence of values

Returns:

promise with collected results or failure

def fromEither[A](thunk: => Either[Throwable, A]): ZAsync[A]

Suspends side effect execution within ZAsync

Suspends side effect execution within ZAsync

Attributes

A

value type

thunk

side effect

Returns:

suspended promise

def succeed[A](value: A): ZAsync[A]

Creates successfully completed ZAsync

Creates successfully completed ZAsync

Attributes

A

value type

value

the value

Returns:

promise completed with value