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>().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BootstrapDispatcherRegistration
impl RefUnwindSafe for BootstrapDispatcherRegistration
impl Send for BootstrapDispatcherRegistration
impl Sync for BootstrapDispatcherRegistration
impl Unpin for BootstrapDispatcherRegistration
impl UnsafeUnpin for BootstrapDispatcherRegistration
impl UnwindSafe for BootstrapDispatcherRegistration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request