Packages

trait ZIOAppDefault extends ZIOApp

The entry point for a ZIO application.

import zio.ZIOAppDefault
import zio.Console._

object MyApp extends ZIOAppDefault {

  def run =
    for {
      _ <- printLine("Hello! What is your name?")
      n <- readLine
      _ <- printLine("Hello, " + n + ", good to meet you!")
    } yield ()
}
Linear Supertypes
ZIOApp, ZIOAppVersionSpecific, ZIOAppPlatformSpecific, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZIOAppDefault
  2. ZIOApp
  3. ZIOAppVersionSpecific
  4. ZIOAppPlatformSpecific
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Environment = Any
    Definition Classes
    ZIOAppDefaultZIOApp

Abstract Value Members

  1. abstract def run: ZIO[ZIOAppArgs with Scope, Any, Any]

    The main function of the application, which can access the command-line arguments through the args helper method of this class.

    The main function of the application, which can access the command-line arguments through the args helper method of this class. If the provided effect fails for any reason, the cause will be logged, and the exit code of the application will be non-zero. Otherwise, the exit code of the application will be zero.

    Definition Classes
    ZIOApp

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def <>(that: ZIOApp)(implicit trace: Trace): ZIOApp

    Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

    Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

    Definition Classes
    ZIOApp
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val bootstrap: ZLayer[ZIOAppArgs, Any, Any]

    A layer that manages the acquisition and release of services necessary for the application to run.

    A layer that manages the acquisition and release of services necessary for the application to run.

    Definition Classes
    ZIOAppDefaultZIOApp
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. val environmentTag: zio.EnvironmentTag[Any]
    Definition Classes
    ZIOAppDefaultZIOApp
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def exit(code: ExitCode)(implicit trace: Trace): UIO[Unit]

    A helper function to exit the application with the specified exit code.

    A helper function to exit the application with the specified exit code.

    Definition Classes
    ZIOApp
  12. final def getArgs(implicit trace: Trace): ZIO[ZIOAppArgs, Nothing, Chunk[String]]

    A helper function to obtain access to the command-line arguments of the application.

    A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run function.

    Definition Classes
    ZIOApp
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. def installSignalHandlers(runtime: Runtime[Any])(implicit trace: Trace): UIO[Any]
    Attributes
    protected
    Definition Classes
    ZIOApp
  16. final def invoke(args: Chunk[String])(implicit trace: Trace): ZIO[Any, Any, Any]

    Invokes the main app.

    Invokes the main app. Designed primarily for testing.

    Definition Classes
    ZIOApp
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def main(args0: Array[String]): Unit

    The Scala main function, intended to be called only by the Scala runtime.

    The Scala main function, intended to be called only by the Scala runtime.

    Definition Classes
    ZIOAppPlatformSpecific
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. def runtime: Runtime[Any]
    Definition Classes
    ZIOApp
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. implicit macro def validateEnv[R1, R, E, A](zio: ZIO[R, E, A]): ZIO[R1, E, A]

    This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

    This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

    If it is missing requirements, it will report a descriptive error message. Otherwise, the effect will be returned unmodified.

    Definition Classes
    ZIOAppVersionSpecific
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from ZIOApp

Inherited from ZIOAppVersionSpecific

Inherited from ZIOAppPlatformSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped