behavior!() { /* proc-macro */ }Expand description
Create a [Referable] definition, handling a specific set of message types.
Behaviors are used to create an [ActorRef] without having to depend on the
actor’s implementation. Casts are supported for any remote message handled
by the actor.
hyperactor::behavior!(TestActorBehavior, TestMessage, (), MyGeneric<()>, u64,);This macro also supports generic behaviors:
hyperactor::behavior!(TestBehavior<T>, Message<T>, u64,);