Shared

zio.blocks.scope.Wire.Shared
See theShared companion class
object Shared

Companion object for Wire.Shared providing factory methods.

Attributes

Companion
class
Source
Wire.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Shared.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Inherited methods

def fromFunction[In, Out](f: (Scope, Context[In]) => Out): Shared[In, Out]

Creates a Wire.Shared from a construction function.

Creates a Wire.Shared from a construction function.

Use this to build a shared wire with custom construction logic rather than relying on macro derivation via Wire.shared[T].

Type parameters

In

the dependencies required to construct the service

Out

the service type produced

Value parameters

f

the function that constructs the service given a scope and context

Attributes

Returns

a shared wire that constructs the service via f and reuses the same instance for all dependents according to shared wire semantics

Inherited from:
SharedVersionSpecific (hidden)
Source
WireVersionSpecific.scala