Skip to main content

Crate optative_derive

Crate optative_derive 

Source
Expand description

Procedural macros for the optative reconciler library.

  • lifecycle_trace — wraps a Lifecycle impl’s enter / reconcile_self / exit with tracing events.
  • Ephemeral — generates a Drop impl that reconciles managed sets to empty so their exit hooks run on drop.

§Requirements at the call site

The code these macros generate refers to crates by name. Any crate that uses #[lifecycle_trace] must have serde_json and tracing in scope (as standard for derive macros, they are not re-exported by this crate).

Attribute Macros§

lifecycle_trace
Wraps an impl Lifecycle for T block so each lifecycle transition emits a tracing event.

Derive Macros§

Ephemeral
Generates a Drop impl that reconciles #[reconciler]-annotated fields to an empty desired set, running their managed items’ exit hooks on drop.