Expand description
Op invocation lifecycle
implements the Atomic { component_ref } dispatch path
routing through ProtocolRuntime::dispatch_atomic (the
universal-pair-only role trait - see design call #4 in
docs/internal/IMPLEMENTATION_PLAN.md ). The Stateless
syscall path lands.
Structs§
- Role
Dispatcher - One registered
ProtocolRuntime/<Role>Runtimedispatcher.dispatchdowncasts to the concrete typeT(guaranteed by theTypeId-keyed registry) and delegates toT::dispatch_atomic.materializeis the parallel entry forcrate::roles::BackendRuntime::materialize_from_wire; non-Backend roles registerno_materializeso the engine’s wire-decode hot path always finds an entry without a per-role conditional.
Functions§
- make_
aggregator_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::AggregatorRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
backend_ dispatcher - Build a
RoleDispatcherfor a concreteBackendRuntimeimpl — the per-Tdispatch_atomicclosure plus thematerialize_from_wirebridge the derive emits. Backend dispatchers are the only ones that wire a realmaterializeentry; every other role registersno_materialize. - make_
bootstrap_ dispatcher - Build a
BootstrapDispatchFnfor a concreteT: Bootstrap. Called fromEngine::register_bootstrap_dispatcherso the engine’sfire_component_bootstraplookup keys onTypeId::of::<T>()and the synthetic op invokes the user’sT::bootstrapdirectly. - make_
codec_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::CodecRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
data_ source_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::DataSourceRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
index_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::IndexRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
model_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::ModelRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
peer_ selector_ dispatcher - Build a
RoleDispatcherfor a concrete impl of crate::roles::PeerSelectorRuntime. Used byEngine::register_*_dispatcherchain (Node::with_<role>(&value)) so single-role components dispatch through the sameTypeId-keyed registry as multi-role / Protocol-bearing components. - make_
protocol_ dispatcher - Build a
RoleDispatcherfor a concreteProtocolRuntimeimpl. Called fromEngine::register_protocol_dispatcherand from any test/production setup that needs to register dispatcher entries on a fresh Engine. - no_
materialize - Backend-only no-op materialize entry used by non-Backend roles.
Roles other than
Backendnever reach the materialize entry (decode_typed_fill only consults it after confirming the slot binds toComponentRole::Backend), so the unused fn pointer returns a descriptive error rather than panicking.
Type Aliases§
- Backend
Materialize Fn - Type alias for the
BackendRuntime::materialize_from_wiredowncast-dispatch fn pointer. MirrorsProtocolDispatchFn’s erased-Anyshape so the per-T closure stays callable from the engine’s wire-decode hot path without re-doing the downcast lookup on every fill. - Bootstrap
Dispatch Fn - Type alias for the
Bootstrap::bootstrapdowncast-dispatch fn pointer the engine stores per concrete Bootstrap impl. MirrorsProtocolDispatchFn’s erased-Anyshape so the F3 Component bootstrap fire path can invoke the impl without a per-TypeId downcast on every call. The closure downcastsanytoT, runsT::bootstrap(&mut BootstrapCtx), and reports theDispatchResult(Immediate or Async) for the synthetic single- op dispatch. - Protocol
Dispatch Fn - Type alias for the ProtocolRuntime downcast-dispatch fn pointer stored in the dispatcher registry.