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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Thereafter
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def getClass(): Class[_ <: AnyRef]
    Definition Classes
    Any
  2. abstract def thereafter[A](f: F[A])(body: (Content[A]) => Unit)(implicit ec: ExecutionContext): F[A]

    Runs body after the computation f has completed.

    Runs body after the computation f has completed.

    returns

    The computation that results from chaining f before body. Completes only after body has run. If body completes normally, the result of the computation is the same as f's result. If body throws, the result includes the thrown exception.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  6. def hashCode(): Int
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def toString(): String
    Definition Classes
    Any

Inherited from Any

Ungrouped