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 ()
}
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Type members
Types
Value members
Inherited methods
A helper function to exit the application with the specified exit code.
A helper function to exit the application with the specified exit code.
Attributes
- Inherited from:
- ZIOApp
A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run
function.
A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run
function.
Attributes
- Inherited from:
- ZIOApp
Invokes the main app. Designed primarily for testing.
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.
Attributes
- Inherited from:
- ZIOAppPlatformSpecific (hidden)
Inherited and Abstract methods
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.
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.
Attributes
- Inherited from:
- ZIOApp
Concrete fields
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.
Attributes
Implicits
Inherited implicits
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.
Attributes
- Inherited from:
- ZIOAppVersionSpecific