Packages

trait Effect[F[_]] extends AnyRef

an effect type class. a monad describing how the persistence operations in longevity are processed. effects are typically found implicitly when building your LongevityContext. common effects are found within the Effect companion object.

the methods within this trait are used internally by longevity, and are only important to users who wish to implement their own effect type classes.

F

the effectful type

Source
Effect.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Effect
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def flatMap[A, B](fa: F[A])(f: (A) ⇒ F[B]): F[B]

    flatMap an F[A] to an F[B] according to function f with type A => F[B]

  2. abstract def map[A, B](fa: F[A])(f: (A) ⇒ B): F[B]

    map an F[A] to an F[B] according to function f with type A => B

  3. abstract def mapBlocking[A, B](fa: F[A])(f: (A) ⇒ B): F[B]

    map an F[A] to an F[B], using whatever means the effect has to perform potentially blocking operations.

    map an F[A] to an F[B], using whatever means the effect has to perform potentially blocking operations. for example, the effect may choose to perform the operation in a worker thread

  4. abstract def pure[A](a: A): F[A]

    lift a raw value with type A into an F[A]

  5. abstract def run[A](fa: F[A]): A

    execute the effects and produce a result.

    execute the effects and produce a result. this is only used in the test frameworks, which need to execute effects to check the result

    See also

    longevity.test