trait Thereafter[F[_], Content[A]] extends Any
Typeclass for computations with an operation that can run a side effect after the computation has finished.
The typeclass abstracts the following pattern so that it can be used for types other than scala.concurrent.Future.
future.transform { result => val () = body(result); result }
- F
The computation's type functor.
- Content
The container type for computation result. Functionally dependent on
F
.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Thereafter
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Abstract Value Members
- abstract def getClass(): Class[_ <: AnyRef]
- Definition Classes
- Any
- abstract def thereafter[A](f: F[A])(body: (Content[A]) => Unit)(implicit ec: ExecutionContext): F[A]
Runs
body
after the computationf
has completed.Runs
body
after the computationf
has completed.- returns
The computation that results from chaining
f
beforebody
. Completes only afterbody
has run. Ifbody
completes normally, the result of the computation is the same asf
's result. Ifbody
throws, the result includes the thrown exception.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def equals(arg0: Any): Boolean
- Definition Classes
- Any
- def hashCode(): Int
- Definition Classes
- Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def toString(): String
- Definition Classes
- Any