Skip to main content

Crate typestate_pipeline_macros

Crate typestate_pipeline_macros 

Source
Expand description

Proc-macros for the typestate-pipeline ecosystem.

Two macros, two axes of typestate:

  • [transitions] — attribute on an impl block. Each method marked #[transition(into = NextState)] expands into a Resolved + InFlight method pair on a Pipeline newtype carrier.
  • TypestateFactory — derive on a struct. Generates a sibling <Name>Factory<F1, …> with one flag generic per field; finalize() is callable only once the required flags reach Yes.

Use the macros through the typestate-pipeline facade — generated code references items via ::typestate_pipeline::__private::* and depending on this crate alone produces unresolved paths.

Attribute Macros§

transitions
Generate Resolved + InFlight method pairs from a single source body.

Derive Macros§

TypestateFactory
Derive a sibling typestate factory for a struct.