pub struct DispatcherRegistration {
pub type_name: &'static str,
pub role: ComponentRole,
pub register_fn: fn(&mut Engine),
}Expand description
Per-(component_type, role) inventory carrying a per-T
dispatcher-registration fn pointer. Each role derive emits
one of these alongside ComponentRoleBinding; install()
walks the channel + calls register_fn(engine) for each
bound concrete so the engine learns about every role
dispatcher without the install path needing the typed &T.
Fields§
§type_name: &'static strConcreteComponent::TYPE_NAME — the join key.
role: ComponentRoleThe role the registration corresponds to.
register_fn: fn(&mut Engine)Per-T registration callback. The derive captures T at
the emit site and the fn body calls
engine.register_<role>_dispatcher::<T>().
Trait Implementations§
impl Collect for DispatcherRegistration
Auto Trait Implementations§
impl Freeze for DispatcherRegistration
impl RefUnwindSafe for DispatcherRegistration
impl Send for DispatcherRegistration
impl Sync for DispatcherRegistration
impl Unpin for DispatcherRegistration
impl UnsafeUnpin for DispatcherRegistration
impl UnwindSafe for DispatcherRegistration
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
Mutably borrows from an owned value. Read more