The trait Has[A]
is used with ZIO environment to express an effect's
dependency on a service of type A
. For example,
RIO[Has[Console.Service], Unit]
is an effect that requires a
Console.Service
service. Inside the ZIO library, type aliases are provided
as shorthands for common services, e.g.:
type Console = Has[ConsoleService]
Services parameterized on path dependent types are not supported.
- Companion:
- object