FiberRef

object FiberRef
Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

abstract class Proxy[A](val delegate: FiberRef[A]) extends FiberRef[A]

Wraps another FiberRef and delegates all operations to it. Extend this if you need a FiberRef with some specific behavior overridden.

Wraps another FiberRef and delegates all operations to it. Extend this if you need a FiberRef with some specific behavior overridden.

Types

type WithPatch[Value0, Patch0] = FiberRef[Value0] { type Patch = Patch0; }

Value members

Concrete methods

def make[A](initial: => A, fork: A => A, join: (A, A) => A)(implicit trace: Trace): ZIO[Scope, Nothing, FiberRef[A]]

Creates a new FiberRef with given initial value.

Creates a new FiberRef with given initial value.

def makeEnvironment[A](initial: => ZEnvironment[A])(implicit trace: Trace): ZIO[Scope, Nothing, WithPatch[ZEnvironment[A], Patch[A, A]]]

Creates a new FiberRef with specified initial value of the ZEnvironment, using ZEnvironment.Patch to combine updates to the ZEnvironment in a compositional way.

Creates a new FiberRef with specified initial value of the ZEnvironment, using ZEnvironment.Patch to combine updates to the ZEnvironment in a compositional way.

def makePatch[Value, Patch](initial: Value, differ: Differ[Value, Patch], fork: Patch)(implicit trace: Trace): ZIO[Scope, Nothing, WithPatch[Value, Patch]]

Creates a new FiberRef with the specified initial value, using the specified patch type to combine updates to the value in a compositional way.

Creates a new FiberRef with the specified initial value, using the specified patch type to combine updates to the value in a compositional way.

def makeRuntimeFlags(initial: RuntimeFlags)(implicit trace: Trace): ZIO[Scope, Nothing, WithPatch[RuntimeFlags, Patch]]
def makeSet[A](initial: => Set[A])(implicit trace: Trace): ZIO[Scope, Nothing, WithPatch[Set[A], SetPatch[A]]]

Concrete fields

lazy val currentLogAnnotations: FiberRef[Map[String, String]]