trait ZIOApp extends ZIOAppPlatformSpecific with ZIOAppVersionSpecific
An entry point for a ZIO application that allows sharing layers between
applications. For a simpler version that uses the default ZIO environment see
ZIOAppDefault
.
- Self Type
- ZIOApp
- Alphabetic
- By Inheritance
- ZIOApp
- ZIOAppVersionSpecific
- ZIOAppPlatformSpecific
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract type Environment
Abstract Value Members
-
abstract
def
bootstrap: ZLayer[ZIOAppArgs, Any, Environment]
A layer that manages the acquisition and release of services necessary for the application to run.
- implicit abstract def environmentTag: zio.EnvironmentTag[Environment]
-
abstract
def
run: ZIO[Environment with 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.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
exit(code: ExitCode)(implicit trace: Trace): UIO[Unit]
A helper function to exit the application with the specified exit code.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
installSignalHandlers(runtime: Runtime[Any])(implicit trace: Trace): UIO[Any]
- Attributes
- protected
-
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.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
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[Any]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()