Skip to main content

Module invoke

Module invoke 

Source
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§

RoleDispatcher
One registered ProtocolRuntime / <Role>Runtime dispatcher. dispatch downcasts to the concrete type T (guaranteed by the TypeId-keyed registry) and delegates to T::dispatch_atomic. materialize is the parallel entry for crate::roles::BackendRuntime::materialize_from_wire; non-Backend roles register no_materialize so the engine’s wire-decode hot path always finds an entry without a per-role conditional.

Functions§

make_aggregator_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::AggregatorRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_backend_dispatcher
Build a RoleDispatcher for a concrete BackendRuntime impl — the per-T dispatch_atomic closure plus the materialize_from_wire bridge the derive emits. Backend dispatchers are the only ones that wire a real materialize entry; every other role registers no_materialize.
make_bootstrap_dispatcher
Build a BootstrapDispatchFn for a concrete T: Bootstrap. Called from Engine::register_bootstrap_dispatcher so the engine’s fire_component_bootstrap lookup keys on TypeId::of::<T>() and the synthetic op invokes the user’s T::bootstrap directly.
make_codec_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::CodecRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_data_source_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::DataSourceRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_index_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::IndexRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_model_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::ModelRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_peer_selector_dispatcher
Build a RoleDispatcher for a concrete impl of crate::roles::PeerSelectorRuntime. Used by Engine::register_*_dispatcher chain (Node::with_<role>(&value)) so single-role components dispatch through the same TypeId-keyed registry as multi-role / Protocol-bearing components.
make_protocol_dispatcher
Build a RoleDispatcher for a concrete ProtocolRuntime impl. Called from Engine::register_protocol_dispatcher and 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 Backend never reach the materialize entry (decode_typed_fill only consults it after confirming the slot binds to ComponentRole::Backend), so the unused fn pointer returns a descriptive error rather than panicking.

Type Aliases§

BackendMaterializeFn
Type alias for the BackendRuntime::materialize_from_wire downcast-dispatch fn pointer. Mirrors ProtocolDispatchFn’s erased-Any shape so the per-T closure stays callable from the engine’s wire-decode hot path without re-doing the downcast lookup on every fill.
BootstrapDispatchFn
Type alias for the Bootstrap::bootstrap downcast-dispatch fn pointer the engine stores per concrete Bootstrap impl. Mirrors ProtocolDispatchFn’s erased-Any shape so the F3 Component bootstrap fire path can invoke the impl without a per-TypeId downcast on every call. The closure downcasts any to T, runs T::bootstrap(&mut BootstrapCtx), and reports the DispatchResult (Immediate or Async) for the synthetic single- op dispatch.
ProtocolDispatchFn
Type alias for the ProtocolRuntime downcast-dispatch fn pointer stored in the dispatcher registry.