Expand description
Phase 216.A.4 — tag types Node authors hold on Self::State to
match against incoming Callback in
ExecutableNode::on_callback.
Each tag is an opaque newtype around a &'static str (the stable
callback identifier shape — see
CallbackId). The three flavors
(SubscriptionTag, ServiceTag, ActionTag) keep the kind
distinct at the type level so a Node author can’t accidentally match
a subscription tag against a service callback.
Tag types support:
-
Into<CallbackId<'static>>— convert a tag into a borrowableCallbackIdwhen handing off to the runtime. -
PartialEq<Callback<'_>>— match directly against theCallbackdelivered toExecutableNode::on_callback:ⓘif state.sub_chatter == cb { /* … */ } -
placeholder— const-fn sentinel used by macro-emittedinit()bodies before the real tag is resolved (the macro overwrites at register time).
The companion NodeContext::create_subscription_static /
_service_static / _action_static methods that consume these tags
at register time land in a follow-up commit; this commit ships only
the types so the 216.B.5 + 216.C.5 example carving can declare them.
Structs§
- Action
Tag - Tag identifying an action-server callback registered on a Node.
- Service
Tag - Tag identifying a service-server callback registered on a Node.
- Subscription
Tag - Tag identifying a subscription callback registered on a Node.