trait ZIOAppDefault extends ZIOApp
The entry point for a ZIO application.
import zio.ZIOApp 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 () }
- Alphabetic
- By Inheritance
- ZIOAppDefault
- ZIOApp
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- abstract def run: ZIO[Environment with zio.ZEnv with Has[ZIOAppArgs], Any, Any]
The main function of the application, which can access the command-line arguments through the
argshelper method of this class.The main function of the application, which can access the command-line arguments through the
argshelper 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def <>(that: ZIOApp): ZIOApp
Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def args: ZIO[Has[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
runfunction.- Definition Classes
- ZIOApp
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def exit(code: ExitCode): 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
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hook: RuntimeConfigAspect
A hook into the ZIO runtime configuration used for boostrapping the application.
A hook into the ZIO runtime configuration used for boostrapping the application. This hook can be used to install low-level functionality into the ZIO application, such as logging, profiling, and other similar foundational pieces of infrastructure.
- Definition Classes
- ZIOApp
- final def invoke(args: Chunk[String]): ZIO[zio.ZEnv, Nothing, ExitCode]
Invokes the main app.
Invokes the main app. Designed primarily for testing.
- Definition Classes
- ZIOApp
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val layer: ZLayer[Has[ZIOAppArgs], Any, zio.ZEnv]
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
- ZIOAppDefault → ZIOApp
- 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
- ZIOApp
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def runtime: Runtime[zio.ZEnv]
- Definition Classes
- ZIOApp
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tag: zio.Tag[zio.ZEnv]
- Definition Classes
- ZIOAppDefault → ZIOApp
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()