FiberRefs

final class FiberRefs

FiberRefs is a data type that represents a collection of FiberRef values. This allows safely propagating FiberRef values across fiber boundaries, for example between an asynchronous producer and consumer.

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def fiberRefs: Set[FiberRef[_]]

Returns a set of each FiberRef in this collection.

Returns a set of each FiberRef in this collection.

def get[A](fiberRef: FiberRef[A]): Option[A]

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or None otherwise.

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or None otherwise.

def getOrDefault[A](fiberRef: FiberRef[A]): A

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or the initial value of the FiberRef otherwise.

Gets the value of the specified FiberRef in this collection of FiberRef values if it exists or the initial value of the FiberRef otherwise.

def setAll(implicit trace: Trace): UIO[Unit]

Sets the value of each FiberRef for the fiber running this effect to the value in this collection of FiberRef values.

Sets the value of each FiberRef for the fiber running this effect to the value in this collection of FiberRef values.