FiberRefs

zio.FiberRefs
See theFiberRefs companion object
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.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def delete(fiberRef: FiberRef[_]): FiberRefs

Returns a new fiber refs with the specified ref deleted from it.

Returns a new fiber refs with the specified ref deleted from it.

Attributes

Returns a set of each FiberRef in this collection.

Returns a set of each FiberRef in this collection.

Attributes

def forkAs(childId: Runtime): FiberRefs

Forks this collection of fiber refs as the specified child fiber id. This will potentially modify the value of the fiber refs, as determined by the individual fiber refs that make up the collection.

Forks this collection of fiber refs as the specified child fiber id. This will potentially modify the value of the fiber refs, as determined by the individual fiber refs that make up the collection.

Attributes

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.

Attributes

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.

Attributes

def joinAs(fiberId: Runtime)(that: FiberRefs): FiberRefs

Joins this collection of fiber refs to the specified collection, as the specified fiber id. This will perform diffing and merging to ensure preservation of maximum information from both child and parent refs.

Joins this collection of fiber refs to the specified collection, as the specified fiber id. This will perform diffing and merging to ensure preservation of maximum information from both child and parent refs.

Attributes

def setAll(implicit trace: Trace): UIO[Unit]
final override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any
def updatedAs[A](fiberId: Runtime)(fiberRef: FiberRef[A], value: A): FiberRefs