pub struct BootstrapDispatcherRegistration {
pub type_name: &'static str,
pub register_fn: fn(&mut Engine),
}Expand description
Per-concrete inventory carrying a per-T Bootstrap dispatcher-
registration fn pointer. The #[derive(bb::Concrete)] macro
emits one of these per registered concrete so the install path
can register every concrete’s Bootstrap dispatcher without the
per-T downcast. Pairs with crate::engine::Engine::register_bootstrap_dispatcher.
The derive’s emitted impl falls back to the
crate::contracts::bootstrap::Bootstrap trait default (no-op),
so a Concrete with no manual impl Bootstrap still registers a
dispatcher entry that drains the Component bootstrap phase
cleanly. Authors override the default by hand-writing
impl Bootstrap for X alongside the derive — the derive’s
#[bb(bootstrap_override)] attribute (parsed in
bb-derive::parse) suppresses the default-impl emission so the
two impls do not collide.
Fields§
§type_name: &'static strConcreteComponent::TYPE_NAME — the join key against
ConcreteComponentRegistration.
register_fn: fn(&mut Engine)Per-T registration callback. The derive captures T at
the emit site and the fn body calls
engine.register_bootstrap_dispatcher::<T>().