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
- Alphabetic
- By Inheritance
- Effect
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
flatMap[A, B](fa: F[A])(f: (A) ⇒ F[B]): F[B]
flatMap an
F[A]
to anF[B]
according to functionf
with typeA => F[B]
-
abstract
def
map[A, B](fa: F[A])(f: (A) ⇒ B): F[B]
map an
F[A]
to anF[B]
according to functionf
with typeA => B
-
abstract
def
mapBlocking[A, B](fa: F[A])(f: (A) ⇒ B): F[B]
map an
F[A]
to anF[B]
, using whatever means the effect has to perform potentially blocking operations.map an
F[A]
to anF[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 -
abstract
def
pure[A](a: A): F[A]
lift a raw value with type
A
into anF[A]
-
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
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Effect[F], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensuring(cond: (Effect[F]) ⇒ Boolean, msg: ⇒ Any): Effect[F]
- def ensuring(cond: (Effect[F]) ⇒ Boolean): Effect[F]
- def ensuring(cond: Boolean, msg: ⇒ Any): Effect[F]
- def ensuring(cond: Boolean): Effect[F]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def →[B](y: B): (Effect[F], B)