Unique

zio.blocks.scope.Wire.Unique
See theUnique companion class
object Unique

Companion object for Wire.Unique providing factory methods.

Attributes

Companion
class
Source
Wire.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Unique.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): Unique[In, Out]

Creates a Wire.Unique from a construction function.

Creates a Wire.Unique from a construction function.

Use this to build a unique wire with custom construction logic rather than relying on macro derivation via Wire.unique[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 unique wire that creates a fresh instance on each use

Inherited from:
UniqueVersionSpecific (hidden)
Source
WireVersionSpecific.scala