Has

final class Has[A] extends Serializable

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
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
override def hashCode: Int
Definition Classes
Any
def size: Int

The size of the environment, which is the number of services contained in the environment. This is intended primarily for testing purposes.

The size of the environment, which is the number of services contained in the environment. This is intended primarily for testing purposes.

override def toString: String
Definition Classes
Any