NodeKey<HSelf>The Context key of a Node (HSelf = its identity): a service whose value is the
transport NodeProtocol. Stored on a node-bearing tag under nodeSym; read by
Hyperlink.client to resolve where to connect (its requirement channel).
export type type NodeKey<HSelf> = Context.Key<
HSelf,
NodeProtocol
>
The Context key of a
Node
(HSelf = its identity): a service whose value is the
transport
NodeProtocol
. Stored on a node-bearing tag under
nodeSym
; read by
Hyperlink.client
to resolve where to connect (its requirement channel).
NodeKey<function (type parameter) HSelf in type NodeKey<HSelf>HSelf> = import ContextContext.interface Key<out Identifier, out Shape>Typed identifier for a service stored in a Context.
When to use
Use as the typed handle for storing, retrieving, and requiring a specific
service in a Context.
Details
Identifier tracks the requirement in Effect types, while Shape is the
service implementation retrieved by the key. A key is also an Effect value,
so yielding it inside Effect.gen retrieves the service from the current
fiber context.
Key<function (type parameter) HSelf in type NodeKey<HSelf>HSelf, NodeProtocol>;