Expand description
Registry of host-provided (“core”) capability handlers, keyed by catalogue entry key.
This generalises the crate::plugin_log_sink::PluginLogSink pattern from a single sink to
one handler per capability shape: the driver defines a narrow trait per capability (matching
an operation already defined for plugins), the embedding Pact framework implements it and
registers an instance here at startup, and the driver never has a compile-time dependency on
that implementation. See proposal 007 (Driver-plugin callback model) for the full design.
Registration should happen alongside crate::catalogue_manager::register_core_entries for
the corresponding CatalogueEntryProviderType::CORE entry, so an entry and its handler never
drift apart. Callers resolve a capability via the catalogue entry’s key (unprefixed, e.g.
"xml" for core/content-matcher/xml), not the full catalogue key.
Traits§
- Core
Content Generator - A host-provided handler for the
GenerateContentcapability shape. Implemented by the embedding Pact framework and registered viaregister_core_content_generator. - Core
Content Matcher - A host-provided handler for the
CompareContentscapability shape. Implemented by the embedding Pact framework and registered viaregister_core_content_matcher.
Functions§
- deregister_
core_ content_ generator - Remove a registered core content generator handler. Mainly useful for tests.
- deregister_
core_ content_ matcher - Remove a registered core content matcher handler. Mainly useful for tests.
- lookup_
core_ content_ generator - Look up a registered core content generator handler by catalogue entry key.
- lookup_
core_ content_ matcher - Look up a registered core content matcher handler by catalogue entry key.
- register_
core_ content_ generator - Register a handler for a host-provided content generator capability, keyed by the catalogue
entry key (e.g.
"xml"for thecore/content-generator/xmlentry). Replaces any handler previously registered under the same key. - register_
core_ content_ matcher - Register a handler for a host-provided content matcher capability, keyed by the catalogue
entry key (e.g.
"xml"for thecore/content-matcher/xmlentry). Replaces any handler previously registered under the same key.