Trait/Object

zio.prelude.fx

ZPure

Related Docs: object ZPure | package fx

Permalink

sealed trait ZPure[+W, -S1, +S2, -R, +E, +A] extends AnyRef

ZPure[W, S1, S2, R, E, A] is a purely functional description of a computation that requires an environment R and an initial state S1 and may either fail with an E or succeed with an updated state S2 and an A along with in either case a log with entries of type W. Because of its polymorphism ZPure can be used to model a variety of effects including context, state, failure, and logging.

Self Type
ZPure[W, S1, S2, R, E, A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZPure
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def tag: Int

    Permalink
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def &&&[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, (A, B)]

    Permalink

    A symbolic alias for zip.

  4. final def ***[W1 >: W, S3, R1, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, (R, R1), E1, (A, B)]

    Permalink

    Splits the environment, providing the first part to this computation and the second part to that computation.

  5. final def *>[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    A symbolic alias for zipRight.

  6. final def +++[W1 >: W, S0 <: S1, S3 >: S2, R1, B, E1 >: E](that: ZPure[W1, S0, S3, R1, E1, B]): ZPure[W1, S0, S3, Either[R, R1], E1, Either[A, B]]

    Permalink

    Runs this computation if the provided environment is a Left or else runs that computation if the provided environment is a Right, returning the result in an Either.

  7. final def <*[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, A]

    Permalink

    A symbolic alias for zipLeft.

  8. final def <*>[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, (A, B)]

    Permalink

    A symbolic alias for zip.

  9. final def <+>[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, B](that: ⇒ ZPure[W1, S0, S3, R1, E1, B])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, Either[A, B]]

    Permalink

    A symbolic alias for orElseEither.

  10. final def <<<[W1 >: W, S0, R0, E1 >: E](that: ZPure[W1, S0, S1, R0, E1, R]): ZPure[W1, S0, S2, R0, E1, A]

    Permalink

    A symbolic alias for compose.

  11. final def <>[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, A1 >: A](that: ⇒ ZPure[W1, S0, S3, R1, E1, A1])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, A1]

    Permalink

    A symbolic alias for orElse.

  12. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def >>=[W1 >: W, S3, R1 <: R, E1 >: E, B](f: (A) ⇒ ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    A symbolic alias for flatMap.

  14. final def >>>[W1 >: W, S3, E1 >: E, B](that: ZPure[W1, S2, S3, A, E1, B]): ZPure[W1, S1, S3, R, E1, B]

    Permalink

    A symbolic alias for andThen.

  15. final def ??[W1 >: W](w: W1): ZPure[W1, S1, S2, R, E, A]

    Permalink

    A symbolic alias for log.

  16. final def absolve[E1 >: E, B](implicit ev: <:<[A, Either[E1, B]]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Submerges the error case of an Either into the error type of this computation.

  17. final def andThen[W1 >: W, S3, E1 >: E, B](that: ZPure[W1, S2, S3, A, E1, B]): ZPure[W1, S1, S3, R, E1, B]

    Permalink

    Runs this computation and uses its result to provide the specified computation with its required environment.

  18. final def as[B](b: ⇒ B): ZPure[W, S1, S2, R, E, B]

    Permalink

    Maps the success value of this computation to a constant value.

  19. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  20. final def asSome: ZPure[W, S1, S2, R, E, Option[A]]

    Permalink

    Maps the success value of this computation to the optional value.

  21. final def asSomeError(implicit ev: CanFail[E]): ZPure[W, S1, S2, R, Option[E], A]

    Permalink

    Maps the error value of this computation to the optional value.

  22. final def asState[S3](s: S3): ZPure[W, S1, S3, R, E, A]

    Permalink

    Maps the output state to a constant value

  23. final def bimap[E1, B](f: (E) ⇒ E1, g: (A) ⇒ B)(implicit ev: CanFail[E]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Returns a computation whose error and success channels have been mapped by the specified functions, f and g.

  24. final def catchAll[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, A1 >: A](f: (E) ⇒ ZPure[W1, S0, S3, R1, E1, A1])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, A1]

    Permalink

    Recovers from all errors.

  25. final def catchSome[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1 >: E, A1 >: A](pf: PartialFunction[E, ZPure[W1, S0, S3, R1, E1, A1]])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, A1]

    Permalink

    Recovers from some or all of the error cases.

  26. final def clearLogOnError: ZPure[W, S1, S2, R, E, A]

    Permalink

    Modifies the behavior of the inner computation regarding logs, so that logs written in a failed computation will be cleared.

  27. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def collect[E1 >: E, B](e: ⇒ E1)(pf: PartialFunction[A, B]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Transforms the result of this computation with the specified partial function, failing with the e value if the partial function is not defined for the given input.

  29. final def collectM[W1 >: W, S3, R1 <: R, E1 >: E, B](e: ⇒ E1)(pf: PartialFunction[A, ZPure[W1, S2, S3, R1, E1, B]]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    Transforms the result of this computation with the specified partial function which returns a new computation, failing with the e value if the partial function is not defined for the given input.

  30. final def compose[W1 >: W, S0, R0, E1 >: E](that: ZPure[W1, S0, S1, R0, E1, R]): ZPure[W1, S0, S2, R0, E1, A]

    Permalink

    Runs the specified computation and uses its result to provide this computation with its required environment.

  31. final def contramapState[S0](f: (S0) ⇒ S1): ZPure[W, S0, S2, R, E, A]

    Permalink

    Transforms the initial state of this computation with the specified function.

  32. final def either[S3 >: S2 <: S1](implicit ev: CanFail[E]): ZPure[W, S3, S3, R, Nothing, Either[E, A]]

    Permalink

    Returns a computation whose failure and success have been lifted into an Either.

    Returns a computation whose failure and success have been lifted into an Either. The resulting computation cannot fail, because the failure case has been exposed as part of the Either success case.

  33. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def filterOrElse[W1 >: W, S3 >: S2, R1 <: R, E1 >: E, A1 >: A](p: (A) ⇒ Boolean)(f: (A) ⇒ ZPure[W1, S2, S3, R1, E1, A1]): ZPure[W1, S1, S3, R1, E1, A1]

    Permalink

    Applies the specified function if the predicate fails.

  36. final def filterOrElse_[W1 >: W, S3 >: S2, R1 <: R, E1 >: E, A1 >: A](p: (A) ⇒ Boolean)(zPure: ⇒ ZPure[W1, S2, S3, R1, E1, A1]): ZPure[W1, S1, S3, R1, E1, A1]

    Permalink

    Similar to filterOrElse, but instead of a function it accepts the ZPure computation to apply if the predicate fails.

  37. final def filterOrFail[E1 >: E](p: (A) ⇒ Boolean)(e: ⇒ E1): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Fails with the specified error if the predicate fails.

  38. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. final def flatMap[W1 >: W, S3, R1 <: R, E1 >: E, B](f: (A) ⇒ ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    Extends this computation with another computation that depends on the result of this computation by running the first computation, using its result to generate a second computation, and running that computation.

  40. final def flatten[W1 >: W, S3, R1 <: R, E1 >: E, B](implicit ev: <:<[A, ZPure[W1, S2, S3, R1, E1, B]]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    Flattens a nested computation to a single computation by running the outer computation and then running the inner computation.

  41. final def flip[S3 >: S2 <: S1]: ZPure[W, S3, S3, R, A, E]

    Permalink

    Swaps the error and success types of this computation.

  42. final def fold[S3 >: S2 <: S1, B](failure: (E) ⇒ B, success: (A) ⇒ B)(implicit ev: CanFail[E]): ZPure[W, S3, S3, R, Nothing, B]

    Permalink

    Folds over the failed or successful results of this computation to yield a computation that does not fail, but succeeds with the value of the left or righr function passed to fold.

  43. final def foldCauseM[W1 >: W, S0 <: S1, S3, R1 <: R, E1, B](failure: (Cause[E]) ⇒ ZPure[W1, S0, S3, R1, E1, B], success: (A) ⇒ ZPure[W1, S2, S3, R1, E1, B])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, B]

    Permalink
  44. final def foldM[W1 >: W, S0 <: S1, S3, R1 <: R, E1, B](failure: (E) ⇒ ZPure[W1, S0, S3, R1, E1, B], success: (A) ⇒ ZPure[W1, S2, S3, R1, E1, B])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, B]

    Permalink

    Recovers from errors by accepting one computation to execute for the case of an error, and one computation to execute for the case of success.

  45. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  46. final def getState: ZPure[W, S1, S2, R, E, (S2, A)]

    Permalink

    Exposes the output state into the value channel.

  47. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  48. final def head[B](implicit ev: <:<[A, List[B]]): ZPure[W, S1, S2, R, Option[E], B]

    Permalink

    Returns a successful computation with the head of the list if the list is non-empty or fails with the error None if the list is empty.

  49. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  50. final def join[W1 >: W, S0 <: S1, S3 >: S2, R1, B, E1 >: E, A1 >: A](that: ZPure[W1, S0, S3, R1, E1, A1]): ZPure[W1, S0, S3, Either[R, R1], E1, A1]

    Permalink

    Runs this computation if the provided environment is a Left or else runs that computation if the provided environment is a Right, unifying the result to a common supertype.

  51. final def keepLogOnError: ZPure[W, S1, S2, R, E, A]

    Permalink

    Modifies the behavior of the inner computation regarding logs, so that logs written in a failed computation will be kept (this is the default behavior).

  52. final def left[B, C](implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, Option[E], B]

    Permalink

    Returns a successful computation if the value is Left, or fails with error None.

  53. final def leftOrFail[B, C, E1 >: E](e: ⇒ E1)(implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Returns a successful computation if the value is Left, or fails with error e.

  54. final def leftOrFailWith[B, C, E1 >: E](e: (C) ⇒ E1)(implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Returns a successful computation if the value is Left, or fails with the given error function e.

  55. final def leftOrFailWithException[B, C, E1 >: NoSuchElementException](implicit ev: <:<[A, Either[B, C]], ev2: <:<[E, E1]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Returns a successful computation if the value is Left, or fails with a java.util.NoSuchElementException.

  56. final def log[W1 >: W](w: W1): ZPure[W1, S1, S2, R, E, A]

    Permalink
  57. final def map[B](f: (A) ⇒ B): ZPure[W, S1, S2, R, E, B]

    Permalink

    Transforms the result of this computation with the specified function.

  58. final def mapError[E1](f: (E) ⇒ E1)(implicit ev: CanFail[E]): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Transforms the error type of this computation with the specified function.

  59. final def mapErrorCause[E2](f: (Cause[E]) ⇒ Cause[E2]): ZPure[W, S1, S2, R, E2, A]

    Permalink

    Returns a computation with its full cause of failure mapped using the specified function.

    Returns a computation with its full cause of failure mapped using the specified function. This can be users to transform errors while preserving the original structure of the Cause.

  60. final def mapState[S3](f: (S2) ⇒ S3): ZPure[W, S1, S3, R, E, A]

    Permalink

    Transforms the updated state of this computation with the specified function.

  61. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  62. final def negate(implicit ev: <:<[A, Boolean]): ZPure[W, S1, S2, R, E, Boolean]

    Permalink

    Negates the boolean value of this computation.

  63. final def none[B](implicit ev: <:<[A, Option[B]]): ZPure[W, S1, S2, R, Option[E], Unit]

    Permalink

    Requires the value of this computation to be None, otherwise fails with None.

  64. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  65. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  66. final def orElse[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, A1 >: A](that: ⇒ ZPure[W1, S0, S3, R1, E1, A1])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, A1]

    Permalink

    Executes this computation and returns its value, if it succeeds, but otherwise executes the specified computation.

  67. final def orElseEither[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, B](that: ⇒ ZPure[W1, S0, S3, R1, E1, B])(implicit ev: CanFail[E]): ZPure[W1, S0, S3, R1, E1, Either[A, B]]

    Permalink

    Executes this computation and returns its value, if it succeeds, but otherwise executes the specified computation.

  68. final def orElseFail[E1](e1: ⇒ E1)(implicit ev: CanFail[E]): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Executes this computation and returns its value, if it succeeds, but otherwise fails with the specified error.

  69. final def orElseFallback[A1 >: A, S3 >: S2](a1: ⇒ A1, s3: ⇒ S3)(implicit ev: CanFail[E]): ZPure[W, S1, S3, R, Nothing, A1]

    Permalink

    Executes this computation and returns its value, if it succeeds, but otherwise fallbacks to the new state with the specified value.

  70. final def orElseOptional[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1, A1 >: A](that: ⇒ ZPure[W1, S0, S3, R1, Option[E1], A1])(implicit ev: <:<[E, Option[E1]]): ZPure[W1, S0, S3, R1, Option[E1], A1]

    Permalink

    Returns an computation that will produce the value of this computation, unless it fails with the None value, in which case it will produce the value of the specified computation.

  71. final def orElseSucceed[A1 >: A](a1: ⇒ A1)(implicit ev: CanFail[E]): ZPure[W, S1, Any, R, Nothing, A1]

    Permalink

    Executes this computation and returns its value, if it succeeds, but otherwise succeeds with the specified value.

  72. final def provide(r: R)(implicit ev: NeedsEnv[R]): ZPure[W, S1, S2, Any, E, A]

    Permalink

    Provides this computation with its required environment.

  73. final def provideSome[R0](f: (R0) ⇒ R): ZPure[W, S1, S2, R0, E, A]

    Permalink

    Provides this computation with part of its required environment, leaving the remainder.

  74. final def provideState(s: S1): ZPure[W, Any, S2, R, E, A]

    Permalink

    Provides this computation with its initial state.

  75. final def refineOrDie[E1](pf: PartialFunction[E, E1])(implicit ev1: <:<[E, Throwable], ev2: CanFail[E]): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Keeps some of the errors, and throw the rest

  76. final def refineOrDieWith[E1](pf: PartialFunction[E, E1])(f: (E) ⇒ Throwable)(implicit ev: CanFail[E]): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Keeps some of the errors, and throw the rest, using the specified function to convert the E into a Throwable.

  77. final def reject[S0 <: S1, S3 >: S2, R1 <: R, E1 >: E](pf: PartialFunction[A, E1]): ZPure[W, S0, S3, R1, E1, A]

    Permalink

    Fail with the returned value if the PartialFunction matches, otherwise continue with our held value.

  78. final def rejectM[W1 >: W, S0 <: S1, S3 >: S2, R1 <: R, E1 >: E](pf: PartialFunction[A, ZPure[W1, S2, S3, R1, E1, E1]]): ZPure[W1, S0, S3, R1, E1, A]

    Permalink

    Continue with the returned computation if the PartialFunction matches, translating the successful match into a failure, otherwise continue with our held value.

  79. final def repeatN(n: Int)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A]

    Permalink

    Repeats this computation the specified number of times (or until the first failure) passing the updated state to each successive repetition.

  80. final def repeatUntil(f: (A) ⇒ Boolean)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A]

    Permalink

    Repeats this computation until its value satisfies the specified predicate (or until the first failure) passing the updated state to each successive repetition.

  81. final def repeatUntilEquals[A1 >: A](a: ⇒ A1)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A1]

    Permalink

    Repeats this computation until its value is equal to the specified value (or until the first failure) passing the updated state to each successive repetition.

  82. final def repeatUntilState(f: (S2) ⇒ Boolean)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A]

    Permalink

    Repeats this computation until the updated state satisfies the specified predicate (or until the first failure) passing the updated state to each successive repetition.

  83. final def repeatUntilStateEquals[S3 >: S2](s: ⇒ S3)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S3, R, E, A]

    Permalink

    Repeats this computation until the updated state is equal to the specified value (or until the first failure) passing the updated state to each successive repetition.

  84. final def repeatWhile(f: (A) ⇒ Boolean)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A]

    Permalink

    Repeats this computation for as long as its value satisfies the specified predicate (or until the first failure) passing the updated state to each successive repetition.

  85. final def repeatWhileEquals[A1 >: A](a: ⇒ A1)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A1]

    Permalink

    Repeats this computation for as long as its value is equal to the specified value (or until the first failure) passing the updated state to each successive repetition.

  86. final def repeatWhileState(f: (S2) ⇒ Boolean)(implicit ev: <:<[S2, S1]): ZPure[W, S1, S2, R, E, A]

    Permalink

    Repeats this computation for as long as the updated state satisfies the specified predicate (or until the first failure) passing the updated state to each successive repetition.

  87. final def right[B, C](implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, Option[E], C]

    Permalink

    Returns a successful computation if the value is Right, or fails with error None.

  88. final def rightOrFail[B, C, E1 >: E](e: ⇒ E1)(implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, E1, C]

    Permalink
  89. final def rightOrFailWith[B, C, E1 >: E](e: (B) ⇒ E1)(implicit ev: <:<[A, Either[B, C]]): ZPure[W, S1, S2, R, E1, C]

    Permalink
  90. final def rightOrFailWithException[B, C, E1 >: NoSuchElementException](implicit ev: <:<[A, Either[B, C]], ev2: <:<[E, E1]): ZPure[W, S1, S2, R, E1, C]

    Permalink
  91. final def run(s: S1)(implicit ev1: <:<[Any, R], ev2: <:<[E, Nothing]): (S2, A)

    Permalink

    Runs this computation with the specified initial state, returning both the updated state and the result.

  92. final def run(implicit ev1: <:<[Unit, S1], ev2: <:<[Any, R], ev3: <:<[E, Nothing]): A

    Permalink

    Runs this computation to produce its result.

  93. final def runAll(s: S1)(implicit ev: <:<[Any, R]): (Chunk[W], Either[Cause[E], (S2, A)])

    Permalink

    Runs this computation with the specified initial state, returning both the log and either all the failures that occurred or the updated state and the result.

  94. final def runEither(implicit ev1: <:<[Unit, S1], ev2: <:<[Any, R]): Either[E, A]

    Permalink

    Runs this computation to produce its result or the first failure to occur.

  95. final def runLog(implicit ev1: <:<[Unit, S1], ev2: <:<[Any, R], ev3: <:<[E, Nothing]): (Chunk[W], A)

    Permalink

    Runs this computation to produce its result and the log.

  96. final def runResult(s: S1)(implicit ev1: <:<[Any, R], ev2: <:<[E, Nothing]): A

    Permalink

    Runs this computation with the specified initial state, returning the result and discarding the updated state.

  97. final def runState(s: S1)(implicit ev1: <:<[Any, R], ev2: <:<[E, Nothing]): S2

    Permalink

    Runs this computation with the specified initial state, returning the updated state and discarding the result.

  98. final def runValidation(implicit ev1: <:<[Unit, S1], ev2: <:<[Any, R]): ZValidation[W, E, A]

    Permalink

    Runs this computation to a ZValidation value.

  99. final def sandbox: ZPure[W, S1, S2, R, Cause[E], A]

    Permalink

    Exposes the full cause of failures of this computation.

  100. final def some[B](implicit ev: <:<[A, Option[B]]): ZPure[W, S1, S2, R, Option[E], B]

    Permalink

    Converts an option on values into an option on errors leaving the state unchanged.

  101. final def someOrElse[B](default: ⇒ B)(implicit ev: <:<[A, Option[B]]): ZPure[W, S1, S2, R, E, B]

    Permalink

    Extracts the optional value or returns the given 'default' leaving the state unchanged.

  102. final def someOrElseM[W1 >: W, S3 >: S2, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B])(implicit ev: <:<[A, Option[B]]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    Extracts the optional value or runs the specified computation passing the updated state from this computation.

  103. final def someOrFail[B, E1 >: E](e: ⇒ E1)(implicit ev: <:<[A, Option[B]]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Extracts the optional value or fails with the given error 'e'.

  104. final def someOrFailException[B, E1 >: E](implicit ev: <:<[A, Option[B]], ev2: <:<[NoSuchElementException, E1]): ZPure[W, S1, S2, R, E1, B]

    Permalink

    Extracts the optional value or fails with a java.util.NoSuchElementException leaving the state unchanged.

  105. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  106. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  107. def toZIO[R1 <: R](implicit ev: <:<[Unit, S1], tag: zio.Tag[R1]): ZIO[R1, E, A]

    Permalink

    Transforms ZPure to ZIO that either succeeds with A or fails with error(s) E.

    Transforms ZPure to ZIO that either succeeds with A or fails with error(s) E. The original state is supposed to be ().

  108. def toZIOWith[R1 <: R](s1: S1)(implicit tag: zio.Tag[R1]): ZIO[R1, E, A]

    Permalink

    Transforms ZPure to ZIO that either succeeds with A or fails with error(s) E.

  109. def toZIOWithAll[R1 <: R](s1: S1)(implicit tag: zio.Tag[R1]): ZIO[R1, E, (Chunk[W], S2, A)]

    Permalink

    Transforms ZPure to ZIO that either succeeds with Chunk[W], S2 and A or fails with error(s) E.

  110. def toZIOWithState[R1 <: R](s1: S1)(implicit tag: zio.Tag[R1]): ZIO[R1, E, (S2, A)]

    Permalink

    Transforms ZPure to ZIO that either succeeds with S2 and A or fails with error(s) E.

  111. final def unit: ZPure[W, S1, S2, R, E, Unit]

    Permalink

    Maps the value of this computation to unit.

  112. def unsandbox[E1](implicit ev: <:<[E, Cause[E1]]): ZPure[W, S1, S2, R, E1, A]

    Permalink

    Submerges the full cause of failures of this computation.

  113. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  115. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  116. final def zip[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, (A, B)]

    Permalink

    Combines this computation with the specified computation, passing the updated state from this computation to that computation and combining the results of both into a tuple.

  117. final def zipLeft[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, A]

    Permalink

    Combines this computation with the specified computation, passing the updated state from this computation to that computation and returning the result of this computation.

  118. final def zipRight[W1 >: W, S3, R1 <: R, E1 >: E, B](that: ZPure[W1, S2, S3, R1, E1, B]): ZPure[W1, S1, S3, R1, E1, B]

    Permalink

    Combines this computation with the specified computation, passing the updated state from this computation to that computation and returning the result of that computation.

  119. final def zipWith[W1 >: W, S3, R1 <: R, E1 >: E, B, C](that: ZPure[W1, S2, S3, R1, E1, B])(f: (A, B) ⇒ C): ZPure[W1, S1, S3, R1, E1, C]

    Permalink

    Combines this computation with the specified computation, passing the updated state from this computation to that computation and combining the results of both using the specified function.

  120. final def |||[W1 >: W, S0 <: S1, S3 >: S2, R1, B, E1 >: E, A1 >: A](that: ZPure[W1, S0, S3, R1, E1, A1]): ZPure[W1, S0, S3, Either[R, R1], E1, A1]

    Permalink

    A symbolic alias for join.

Inherited from AnyRef

Inherited from Any

Ungrouped