Documentation
¶
Overview ¶
Package core constructs full Deixis trees and derives sending from selection. It implements Bitwire's structural contract without a carrier or dispatcher.
Index ¶
- Variables
- func AsAddressed(tree wire.WireTree) wire.AddressedWire
- func Compose[T any](own T, children []wire.Child[T]) (wire.DeixisNode[T], error)
- func Select[T any](tree wire.DeixisNode[T], path wire.TreePath) (wire.DeixisNode[T], bool)
- func Send(tree wire.WireTree, path wire.TreePath, message wire.Message) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrDuplicateKey = errors.New("bitruntime: duplicate child key") ErrInvalidTree = errors.New("bitruntime: invalid tree") ErrCycle = errors.New("bitruntime: structural cycle") ErrMissingPath = errors.New("bitruntime: missing tree path") ErrInvalidPath = errors.New("bitruntime: invalid addressed path") ErrInvalidWire = errors.New("bitruntime: missing own wire") )
Functions ¶
func AsAddressed ¶
func AsAddressed(tree wire.WireTree) wire.AddressedWire
AsAddressed exposes a full tree through the existing bitwire/1 addressed access contract. Each Unicode-scalar string segment maps to its exact UTF-8 byte key; malformed UTF-8 is refused before any primitive is called. Empty strings, slashes, dots, and Unicode normalization differences stay literal.
Binary tree keys outside the UTF-8 image remain valid tree keys but cannot be selected through this facade. This adapter grants no receiver or lifecycle authority and provides no inverse conversion from an opaque AddressedWire.
func Compose ¶
Compose constructs a full node. It copies the child collection and all keys, preserves own and child capability identity, and rejects duplicate keys, nil children, and cycles identifiable by Go node identity. Empty and arbitrary binary keys are valid.
Independently implemented children must satisfy DeixisNode's finite, stable topology contract. Compose validates their complete Children graph; continued stability is their implementation's responsibility. Comparable node identities permit cycle detection and shared-node deduplication. Value implementations without comparable identity are also supported under the same finite-tree precondition; no generic traversal can guarantee termination for a foreign implementation that violates it. Payloads need not be comparable. Construction and validation do not call Own, At, or any payload operation on children. There is no transformation from an opaque AddressedWire to a tree.
func Select ¶
func Select[T any](tree wire.DeixisNode[T], path wire.TreePath) (wire.DeixisNode[T], bool)
Select follows exact child keys. An empty path selects tree itself; a missing edge returns (nil, false). It never manufactures a view or uses own as fallback. The tree must satisfy the full, stable DeixisNode contract.
func Send ¶
Send is exactly selection followed by the selected own Wire.Send. Missing selection is ErrMissingPath; a selected primitive's refusal is returned intact. Message and return capability identity are preserved. This operation does not attach receivers, dispatch handlers, or assume ownership of an endpoint.
Types ¶
This section is empty.