final
case class
Lookup[-Key, -Environment, +Error, +Value](lookup: (Key) ⇒ ZIO[Environment, Error, Value]) extends (Key) ⇒ ZIO[Environment, Error, Value] with Product with Serializable
Instance Constructors
-
new
Lookup(lookup: (Key) ⇒ ZIO[Environment, Error, Value])
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
andThen[A](g: (ZIO[Environment, Error, Value]) ⇒ A): (Key) ⇒ A
-
def
apply(key: Key): ZIO[Environment, Error, Value]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
compose[A](g: (A) ⇒ Key): (A) ⇒ ZIO[Environment, Error, Value]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
final
def
isInstanceOf[T0]: Boolean
-
val
lookup: (Key) ⇒ ZIO[Environment, Error, Value]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from (Key) ⇒ ZIO[Environment, Error, Value]
Inherited from AnyRef
Inherited from Any
A
Lookup
represents a lookup function that, given a key of typeKey
, can return aZIO
effect that will either produce a value of typeValue
or fail with an error of typeError
using an environment of typeEnvironment
.You can think of a
Lookup
as an effectual function that computes a value given a key. Given any effectual function you can convert it to a lookup function for a cache by using theLookup
constructor.