pub struct PackRegistry;Expand description
Registry of pack factories discovered via inventory at link time.
No instance is needed — all methods are associated functions that walk the
globally-collected PackRegistration slice.
Implementations§
Source§impl PackRegistry
impl PackRegistry
Sourcepub fn discovered_names() -> Vec<&'static str>
pub fn discovered_names() -> Vec<&'static str>
Names of all pack factories discovered via inventory.
Sourcepub fn register_packs(
names: &[String],
runtime: KhiveRuntime,
builder: &mut VerbRegistryBuilder,
) -> Result<(), PackLoadError>
pub fn register_packs( names: &[String], runtime: KhiveRuntime, builder: &mut VerbRegistryBuilder, ) -> Result<(), PackLoadError>
Register the named packs into builder using the supplied runtime.
Validates the explicit pack list against PackFactory::requires() —
if any requested pack declares a dependency that is absent from names,
registration fails (missing dependency is a boot error, not silently
auto-added). Callers must include all required packs explicitly.
The VerbRegistryBuilder::build topo-sort enforces correct load order.
Returns Ok(()) when all names are recognised and all declared
dependencies are satisfied; returns Err(PackLoadError) with a
distinct variant for unknown pack vs missing dependency.