Skip to main content

Module pack

Module pack 

Source
Expand description

Pack runtime trait and verb registry (ADR-025 step 2).

Packs register verbs into the runtime. The registry routes verb calls to the pack that declares them.

Pack (in khive-types) uses const associated items which are not object-safe. PackRuntime mirrors that metadata as methods so the registry can store packs as trait objects. See ADR-025 §PackRuntime.

Lifecycle: build with VerbRegistryBuilder, then call .build() to get a cheaply-cloneable VerbRegistry. Registration is only possible through the builder.

Structs§

EdgeEndpointRule
A pack-declared endpoint rule for a specific edge relation (ADR-031).
PackRegistration
Newtype wrapper collected by inventory so pack crates can submit &'static dyn PackFactory references without the type-ascription syntax that inventory::submit! does not support for bare trait-object references (ADR-063).
PackRegistry
Registry of pack factories discovered via inventory at link time (ADR-063).
VerbDef
Verb metadata for discovery and documentation.
VerbRegistry
Immutable registry that dispatches verb calls to registered packs.
VerbRegistryBuilder
Builder for constructing a VerbRegistry.

Enums§

EndpointKind
Match spec for one end of an EdgeEndpointRule (ADR-031).

Traits§

DispatchHook
Hook called after every successful verb dispatch (Issue #158).
KindHook
Per-kind specialization for shared CRUD (ADR-030).
PackFactory
Factory for creating pack instances registered via inventory at link time (ADR-063). Each pack crate submits a &'static dyn PackFactory wrapped in a PackRegistration; the binary’s linker collects them all into a single slice iterable at runtime.
PackRuntime
Async dispatch trait for packs (ADR-025).