A host's registry of components (spec/12 §1.1): built from the packages the host enables, and nothing else.
registry = Macaw.Registry.new!([Macaw.Builtin])
{:ok, Macaw.Builtin.Table} = Macaw.Registry.component(registry, "macaw.table")Closed by default: new([]) holds nothing, and a component whose package isn't listed is
unknown though its module is loaded. Names are matched by spelling; no atom is made from a
document's name. Two components of one name across packages fail at boot, naming both.
Summary
Functions
A component by name, a string or an atom read as its spelling: {:ok, module} or :error.
Every component, {name, module}, in name order.
Every hook of the registry's packages (Macaw.Component.Package.hooks/1).
The registry of the listed packages: {:ok, registry}, or every fault at once, a
package's own at [package] and a name two packages share as {:duplicate, name, [{module, package}, {module, package}]}.
The registry of the listed packages, or an ArgumentError with every fault: a host's boot.
The packages, as given, each once.
Types
Functions
A component by name, a string or an atom read as its spelling: {:ok, module} or :error.
Every component, {name, module}, in name order.
@spec hooks(t()) :: {:ok, map()} | {:error, [Macaw.Layers.Fault.t(), ...]}
Every hook of the registry's packages (Macaw.Component.Package.hooks/1).
@spec new([module()]) :: {:ok, t()} | {:error, [Macaw.Layers.Fault.t(), ...]}
The registry of the listed packages: {:ok, registry}, or every fault at once, a
package's own at [package] and a name two packages share as {:duplicate, name, [{module, package}, {module, package}]}.
The registry of the listed packages, or an ArgumentError with every fault: a host's boot.
The packages, as given, each once.