Object/Class

scalaz.zio

IO

Related Docs: class IO | package zio

Permalink

object IO

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IO
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AsyncEffect[E, A] extends IO[E, A]

    Permalink
  2. final class AsyncIOEffect[E, A] extends IO[E, A]

    Permalink
  3. final class Ensuring[E, A] extends IO[E, A]

    Permalink
  4. final class Fail[E] extends IO[E, Nothing]

    Permalink
  5. final class FlatMap[E, A0, A] extends IO[E, A]

    Permalink
  6. final class Fork[E, A] extends IO[Nothing, Fiber[E, A]]

    Permalink
  7. final class Point[A] extends IO[Nothing, A]

    Permalink
  8. final class Race[E, A0, A1, A] extends IO[E, A]

    Permalink
  9. final class Redeem[E1, E2, A, B] extends IO[E2, B] with Function[A, IO[E2, B]]

    Permalink
  10. final class Sleep extends IO[Nothing, Unit]

    Permalink
  11. final class Strict[A] extends IO[Nothing, A]

    Permalink
  12. final class Supervise[E, A] extends IO[E, A]

    Permalink
  13. final class Supervisor extends IO[Nothing, (Throwable) ⇒ IO[Nothing, Unit]]

    Permalink
  14. final class Suspend[E, A] extends IO[E, A]

    Permalink
  15. final class SyncEffect[A] extends IO[Nothing, A]

    Permalink
  16. final class Terminate extends IO[Nothing, Nothing]

    Permalink
  17. final class Uninterruptible[E, A] extends IO[E, A]

    Permalink

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 ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Tags

    Permalink
  5. final def absolve[E, A](v: IO[E, Either[E, A]]): IO[E, A]

    Permalink

    Submerges the error case of an Either into the IO.

    Submerges the error case of an Either into the IO. The inverse operation of IO.attempt.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. final def async[E, A](register: (Callback[E, A]) ⇒ Unit): IO[E, A]

    Permalink

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. See async0 for the more expressive variant of this function.

  8. final def async0[E, A](register: (Callback[E, A]) ⇒ Async[E, A]): IO[E, A]

    Permalink

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. The effect has the option of returning the value synchronously, which is useful in cases where it cannot be determined if the effect is synchronous or asynchronous until the effect is actually executed. The effect also has the option of returning a canceler, which will be used by the runtime to cancel the asynchronous effect if the fiber executing the effect is interrupted.

  9. final def asyncPure[E, A](register: (Callback[E, A]) ⇒ IO[E, Unit]): IO[E, A]

    Permalink

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. This formulation is necessary when the effect is itself expressed in terms of IO.

  10. final def bracket[E, A, B](acquire: IO[E, A])(release: (A) ⇒ IO[Nothing, Unit])(use: (A) ⇒ IO[E, B]): IO[E, B]

    Permalink

    Acquires a resource, do some work with it, and then release that resource.

    Acquires a resource, do some work with it, and then release that resource. bracket will release the resource no matter the outcome of the computation, and will re-throw any exception that occured in between.

  11. final def bracket0[E, A, B](acquire: IO[E, A])(release: (A, ExitResult[E, B]) ⇒ IO[Nothing, Unit])(use: (A) ⇒ IO[E, B]): IO[E, B]

    Permalink

    Acquires a resource, do some work with it, and then release that resource.

    Acquires a resource, do some work with it, and then release that resource. With bracket0 not only is the acquired resource be cleaned up, the outcome of the computation is also reified for processing.

  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def done[E, A](r: ExitResult[E, A]): IO[E, A]

    Permalink

    Creates an IO value from ExitResult

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def fail[E](error: E): IO[E, Nothing]

    Permalink

    Creates an IO value that represents failure with the specified error.

    Creates an IO value that represents failure with the specified error. The moral equivalent of throw for pure code.

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def flatten[E, A](io: IO[E, IO[E, A]]): IO[E, A]

    Permalink

    Flattens a nested action.

  19. final def forkAll[E, A](as: Iterable[IO[E, A]]): IO[Nothing, Fiber[E, List[A]]]

    Permalink

    Forks all of the specified values, and returns a composite fiber that produces a list of their results, in order.

  20. final def fromEither[E, A](v: Either[E, A]): IO[E, A]

    Permalink

    Lifts an Either into an IO.

  21. final def fromOption[A](v: Option[A]): IO[Unit, A]

    Permalink

    Lifts an Option into an IO.

  22. final def fromTry[A](v: Try[A]): IO[Throwable, A]

    Permalink

    Lifts a Try into an IO.

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

    Permalink
    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. final def mergeAll[E, A, B](in: Iterable[IO[E, A]])(zero: B, f: (B, A) ⇒ B): IO[E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, works in parallel.

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

    Permalink
    Definition Classes
    AnyRef
  28. final val never: IO[Nothing, Nothing]

    Permalink

    Returns a action that will never produce anything.

    Returns a action that will never produce anything. The moral equivalent of while(true) {}, only without the wasted CPU cycles.

  29. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  31. final def now[A](a: A): IO[Nothing, A]

    Permalink

    Lifts a strictly evaluated value into the IO monad.

  32. final def parAll[E, A](as: Iterable[IO[E, A]]): IO[E, List[A]]

    Permalink

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. This is the parallel version of sequence.

  33. def parTraverse[E, A, B](as: Iterable[A])(fn: (A) ⇒ IO[E, B]): IO[E, List[B]]

    Permalink

    Evaluate the elements of an Iterable[A] in parallel and collect the results.

    Evaluate the elements of an Iterable[A] in parallel and collect the results. This is the parallel version of traverse.

  34. final def point[A](a: ⇒ A): IO[Nothing, A]

    Permalink

    Lifts a non-strictly evaluated value into the IO monad.

    Lifts a non-strictly evaluated value into the IO monad. Do not use this function to capture effectful code. The result is undefined but may include duplicated effects.

  35. final def raceAll[E, A](io: IO[E, A], ios: Iterable[IO[E, A]]): IO[E, A]

    Permalink

    Races an IO[E, A] against elements of a Iterable[IO[E, A]].

    Races an IO[E, A] against elements of a Iterable[IO[E, A]]. Yields either the first success or the last failure.

  36. final def reduceAll[E, A](a: IO[E, A], as: Iterable[IO[E, A]])(f: (A, A) ⇒ A): IO[E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, works in parallel.

  37. final def require[E, A](error: E): (IO[E, Option[A]]) ⇒ IO[E, A]

    Permalink

    Requires that the given IO[E, Option[A]] contain a value.

    Requires that the given IO[E, Option[A]] contain a value. If there is no value, then the specified error will be raised.

  38. final def sequence[E, A](in: Iterable[IO[E, A]]): IO[E, List[A]]

    Permalink

    Evaluate each effect in the structure from left to right, and collect the results.

    Evaluate each effect in the structure from left to right, and collect the results. For parallelism use parAll.

  39. final def shift(ec: ExecutionContext): IO[Nothing, Unit]

    Permalink

    Shifts the operation to another execution context.

    Shifts the operation to another execution context.

    IO.shift(myPool) *> myTask
  40. final def sleep(duration: Duration): IO[Nothing, Unit]

    Permalink

    Sleeps for the specified duration.

    Sleeps for the specified duration. This is always asynchronous.

  41. final def supervise[E, A](io: IO[E, A]): IO[E, A]

    Permalink

    Supervises the specified action, which ensures that any actions directly forked by the action are killed upon the action's own termination.

  42. final def superviseWith[E, A](io: IO[E, A])(supervisor: (Iterable[Fiber[_, _]]) ⇒ IO[Nothing, Unit]): IO[E, A]

    Permalink

    Supervises the specified action's spawned fibers.

  43. final def supervisor: IO[Nothing, (Throwable) ⇒ IO[Nothing, Unit]]

    Permalink

    Retrieves the supervisor associated with the fiber running the action returned by this method.

  44. final def suspend[E, A](io: ⇒ IO[E, A]): IO[E, A]

    Permalink

    Lazily produces an IO value whose construction may have actional costs that should be deferred until evaluation.

    Lazily produces an IO value whose construction may have actional costs that should be deferred until evaluation.

    Do not use this method to effectfully construct IO values. The results will be undefined and most likely involve the physical explosion of your computer in a heap of rubble.

  45. final def sync[A](effect: ⇒ A): IO[Nothing, A]

    Permalink

    Imports a synchronous effect into a pure IO value.

    Imports a synchronous effect into a pure IO value.

    val nanoTime: IO[Nothing, Long] = IO.sync(System.nanoTime())
  46. final def syncCatch[E, A](effect: ⇒ A)(f: PartialFunction[Throwable, E]): IO[E, A]

    Permalink

    Safely imports an exception-throwing synchronous effect into a pure IO value, translating the specified throwables into E with the provided user-defined function.

  47. final def syncException[A](effect: ⇒ A): IO[Exception, A]

    Permalink

    Imports a synchronous effect into a pure IO value, translating any exceptions into an Exception failure in the returned value.

    Imports a synchronous effect into a pure IO value, translating any exceptions into an Exception failure in the returned value.

    def putStrLn(line: String): IO[Exception, Unit] = IO.syncException(println(line))
  48. final def syncThrowable[A](effect: ⇒ A): IO[Throwable, A]

    Permalink

    Imports a synchronous effect into a pure IO value, translating any throwables into a Throwable failure in the returned value.

    Imports a synchronous effect into a pure IO value, translating any throwables into a Throwable failure in the returned value.

    def putStrLn(line: String): IO[Throwable, Unit] = IO.syncThrowable(println(line))
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  50. final def terminate(t: Throwable, ts: Throwable*): IO[Nothing, Nothing]

    Permalink

    Terminates the fiber executing this action with the specified error(s), running all finalizers.

  51. final def terminate: IO[Nothing, Nothing]

    Permalink

    Terminates the fiber executing this action, running all finalizers.

  52. final def terminate0(ts: List[Throwable]): IO[Nothing, Nothing]

    Permalink

    Terminates the fiber executing this action, running all finalizers.

  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. final def traverse[E, A, B](in: Iterable[A])(fn: (A) ⇒ IO[E, B]): IO[E, List[B]]

    Permalink

    Apply the function fn to each element of the Iterable[A] and return the results in a new List[B].

    Apply the function fn to each element of the Iterable[A] and return the results in a new List[B]. For parallelism use parTraverse.

  55. final val unit: IO[Nothing, Unit]

    Permalink

    Strictly-evaluated unit lifted into the IO monad.

  56. final def unsandbox[E, A](v: IO[Either[List[Throwable], E], A]): IO[E, A]

    Permalink

    The inverse operation IO.sandboxed

    The inverse operation IO.sandboxed

    Terminates with exceptions on the Left side of the Either error, if it exists. Otherwise extracts the contained IO[E, A]

  57. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped