TxnVarOps

ai.entrolution.bengal.stm.syntax.all.`package`.TxnVarOps
implicit class TxnVarOps[F[_], V](txnVar: TxnVar[F, V])(implicit evidence$1: STM[F])

Syntax for TxnVar with F-variant operations.

Attributes

Source
package.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def get: Txn[V]

Retrieves the current value within a transaction.

Retrieves the current value within a transaction.

Attributes

Source
package.scala
def modify(f: V => V): Txn[Unit]

Modifies the value by applying a pure function.

Modifies the value by applying a pure function.

Attributes

Source
package.scala
def modifyF(f: V => F[V]): Txn[Unit]

Modifies the value by applying an effectful function.

Modifies the value by applying an effectful function. The function must not encapsulate side effects.

Attributes

Source
package.scala
def set(newValue: => V): Txn[Unit]

Sets a new value within a transaction.

Sets a new value within a transaction.

Attributes

Source
package.scala
def setF(newValue: F[V]): Txn[Unit]

Sets a new value provided by an effect F[V].

Sets a new value provided by an effect F[V]. The effect must not encapsulate side effects.

Attributes

Source
package.scala