final
class
Service[A, B] extends AnyVal
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
apply(a: A): Task[Option[B]]
-
final
def
asInstanceOf[T0]: T0
-
def
contramap[C](f: (C) ⇒ A): Service[C, B]
-
def
flatMap[C](f: (B) ⇒ Service[A, C]): Service[A, C]
-
def
flatMapTask[C](f: (B) ⇒ Task[Option[C]]): Service[A, C]
-
def
getClass(): Class[_ <: AnyVal]
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[C](f: (B) ⇒ C): Service[A, C]
-
def
or[B1 >: B](a: A, default: ⇒ Task[B1]): Task[B1]
-
def
orElse[A1 <: A, B1 >: B](other: Service[A1, B1]): Service[A1, B1]
-
val
run: (A) ⇒ Task[Option[B]]
-
def
runT(a: A): OptionT[Task, B]
-
def
toString(): String
A service is an asynchronous function from a request to an optional response. It wraps a function
A => Task[Option[B]]
with useful methods to deal with both the asynchronicity and the optionality.the request type
the response type