object ZPure
- Alphabetic
- By Inheritance
- ZPure
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class EnvironmentWithPartiallyApplied[R] extends AnyVal
- final class EnvironmentWithPurePartiallyApplied[R] extends AnyVal
- sealed trait FlagType extends AnyRef
- final class ServiceWithPartiallyApplied[R] extends AnyVal
- final class ServiceWithPurePartiallyApplied[R] extends AnyVal
- implicit final class ZPureRefineToOrDieOps[W, S1, S2, R, E <: Throwable, A] extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit def ZPureCovariant[W, S1, S2, R, E]: Covariant[[+A]ZPure[W, S1, S2, R, E, A]]
The
Covariant
instance forZPure
. - implicit def ZPureCovariantIdentityBoth[W, S, R, E]: CovariantIdentityBoth[[+A]ZPure[W, S, S, R, E, A]]
The
IdentityBoth
instance forZPure
. - implicit def ZPureIdentityFlatten[W, S, R, E]: IdentityFlatten[[+A]ZPure[W, S, S, R, E, A]]
The
IdentityFlatten
instance forZPure
. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attempt[S, A](a: => A): ZPure[Nothing, S, S, Any, Throwable, A]
Constructs a computation, catching any
Throwable
that is thrown. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collectAll[F[+_], W, S, R, E, A](fa: F[ZPure[W, S, S, R, E, A]])(implicit arg0: ForEach[F]): ZPure[W, S, S, R, E, F[A]]
Combines a collection of computations into a single computation that passes the updated state from each computation to the next and collects the results.
- def environment[S, R]: ZPure[Nothing, S, S, R, Nothing, ZEnvironment[R]]
Accesses the whole environment of the computation.
- def environmentWith[R]: EnvironmentWithPartiallyApplied[R]
Accesses the environment of the computation.
- def environmentWithPure[R]: EnvironmentWithPurePartiallyApplied[R]
Accesses the environment of the computation in the context of a computation.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail[E](e: E): ZPure[Nothing, Any, Nothing, Any, E, Nothing]
- def failCause[E](cause: Cause[E]): ZPure[Nothing, Any, Nothing, Any, E, Nothing]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def forEach[F[+_], W, S, R, E, A, B](fa: F[A])(f: (A) => ZPure[W, S, S, R, E, B])(implicit arg0: ForEach[F]): ZPure[W, S, S, R, E, F[B]]
Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.
- def foreach[W, S, R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) => ZPure[W, S, S, R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]]): ZPure[W, S, S, R, E, Collection[B]]
Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and collects the results.
- def foreachDiscard[W, S, R, E, A, B](in: Iterable[A])(f: (A) => ZPure[W, S, S, R, E, B]): ZPure[W, S, S, R, E, Unit]
Maps each element of a collection to a computation and combines them all into a single computation that passes the updated state from each computation to the next and discards the results.
- def fromEither[S, L, R](either: Either[L, R]): ZPure[Nothing, S, S, Any, L, R]
Constructs a computation from an
Either
. - def fromOption[S, A](option: Option[A]): ZPure[Nothing, S, S, Any, Unit, A]
Constructs a computation from an
Option
. - def fromPredicate[A](value: A)(f: (A) => Boolean): Validation[None.type, A]
Constructs a
Validation
from a predicate, failing with None. - def fromPredicateWith[E, A](error: => E)(value: A)(f: (A) => Boolean): Validation[E, A]
Constructs a
Validation
from a predicate, failing with the error provided. - def fromTry[S, A](t: Try[A]): ZPure[Nothing, S, S, Any, Throwable, A]
Constructs a computation from a
scala.util.Try
. - def get[S]: ZPure[Nothing, S, S, Any, Nothing, S]
Constructs a computation that returns the initial state unchanged.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def log[S, W](w: W): ZPure[W, S, S, Any, Nothing, Unit]
- def modify[S1, S2, A](f: (S1) => (A, S2)): ZPure[Nothing, S1, S2, Any, Nothing, A]
Constructs a computation from the specified modify function.
- def modifyEither[S1, S2, E, A](f: (S1) => Either[E, (A, S2)]): ZPure[Nothing, S1, S2, Any, E, A]
Constructs a computation that may fail from the specified modify function.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def none[S]: ZPure[Nothing, S, S, Any, Nothing, Option[Nothing]]
Constructs a computation that succeeds with the
None
value. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def service[S, R](implicit arg0: Tag[R]): ZPure[Nothing, S, S, R, Nothing, R]
Accesses the specified service in the environment of the computation.
- def serviceWith[R]: ServiceWithPartiallyApplied[R]
Accesses the specified service in the environment of the computation.
- def serviceWithPure[R]: ServiceWithPurePartiallyApplied[R]
Accesses the specified service in the environment of the computation in the context of a computation.
- def set[S](s: S): ZPure[Nothing, Any, S, Any, Nothing, Unit]
Constructs a computation that sets the state to the specified value.
- def succeed[S, A](a: A): ZPure[Nothing, S, S, Any, Nothing, A]
Constructs a computation that always succeeds with the specified value, passing the state through unchanged.
- def suspend[W, S1, S2, R, E, A](pure: => ZPure[W, S1, S2, R, E, A]): ZPure[W, S1, S2, R, E, A]
Returns a lazily constructed computation, whose construction may itself require effects.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unit[S]: ZPure[Nothing, S, S, Any, Nothing, Unit]
Constructs a computation that always returns the
Unit
value, passing the state through unchanged. - def unless[W, S, R, E, A](p: Boolean)(pure: => ZPure[W, S, S, R, E, A]): ZPure[W, S, S, R, E, Option[A]]
The moral equivalent of
if (!p) exp
- def update[S1, S2](f: (S1) => S2): ZPure[Nothing, S1, S2, Any, Nothing, Unit]
Constructs a computation from the specified update function.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def when[W, S, R, E, A](p: Boolean)(pure: => ZPure[W, S, S, R, E, A]): ZPure[W, S, S, R, E, Option[A]]
The moral equivalent of
if (p) exp
- def whenCase[W, S, R, E, A, B](a: A)(pf: PartialFunction[A, ZPure[W, S, S, R, E, B]]): ZPure[W, S, S, R, E, Option[B]]
Runs a computation when the supplied
PartialFunction
matches for the given value, otherwise does nothing. - object FlagType