#[node]Expand description
Apply to impl Node for ... blocks, inherent impl X { ... } blocks, or
the Node trait definition itself.
Two surface forms are supported on impl blocks:
- Trait-impl form (legacy):
#[node] impl Node<S> for X { ... }. The macro inferstype PrepResult/type ExecResultfrom the return types ofprepandexec, and supplies a defaultfn config(&self) -> TaskConfigwhen missing. - Inherent-impl form:
#[node(state = S [, key = K])] impl X { ... }. The macro builds theimpl Node<S [, K]> for Xheader from the attribute args, enforces thatprep/exec/postare present, and injects the same boilerplate as form 1.
On a trait definition (#[node] pub trait Node ...) the macro just performs
the async-fn-in-trait rewrite.