Expand description
Build typed operation plans, then describe, dry-run, or execute them.
rehearse records declared operation impact. It does not infer effects from
arbitrary Rust code. A pipeline builds a static ordered Plan, and the
runner decides whether each operation is only described, safely rehearsed, or
fully executed.
The default macro frontend is available through #[operation] and
#[pipeline]. The manual PlanBuilder API remains public for tests and
lower-level integrations.
Manual construction works with default features disabled:
use rehearse::{Impact, Operation, OperationMetadata, PlanBuilder};
let mut builder = PlanBuilder::<(), ()>::new("example");
let output = builder.add(Operation::sync(
OperationMetadata::new("answer", Impact::Pure),
(),
|_, ()| Ok(42_u32),
));
let plan = builder.try_finish(output).expect("valid plan");
assert_eq!(plan.describe().len(), 1);Re-exports§
pub use plan::Input;pub use plan::IntoInput;pub use plan::NodeId;pub use plan::OperationInputs;pub use plan::Plan;pub use plan::PlanBuilder;pub use plan::Value;
Modules§
Macros§
- step
- Marker macro consumed by
#[pipeline].
Structs§
- Console
Progress - Progress listener that prints concise progress to stdout.
- Console
Progress Options - Options for
ConsoleProgress. - DryRun
Failure - Error returned by
DryRunReport::require_no_failures. - DryRun
Incomplete - Error returned by
DryRunReport::require_complete. - DryRun
Report - Structured report returned by dry-run mode.
- Node
Report - Report row for one dry-run node.
- Noop
Progress - Progress listener that ignores every event.
- Operation
- A delayed operation descriptor.
- Operation
Metadata - Static metadata attached to an operation node.
- Plan
Description - Owned static description of a plan.
- Plan
Description Row - Static description row for one plan node.
- Plan
Execution Description - Owned static description of execute-mode plan order.
- Plan
Execution Description Row - Static execute-mode description row for one plan node.
- Progress
Node - Static metadata for the node currently being reported.
- Safe
DryRun - Default conservative dry-run policy.
Enums§
- DryRun
Action - The action a dry-run policy assigns to an operation.
- DryRun
Status - Aggregate dry-run status.
- Execute
Error - Error returned by execute mode.
- Impact
- Declared impact for an operation.
- Invariant
Error - An invariant failure in a validated plan or its per-run value store.
- Node
Outcome - Outcome recorded for one dry-run node.
- Plan
Build Error - Invalid value reference found while constructing a plan.
consumer: Noneidentifies the selected final output. - Progress
Event - Progress event emitted while describing or running a plan.
- Progress
Mode - Runtime mode that emitted a progress event.
- Progress
Outcome - Node-level outcome observed by a progress listener.
- Progress
Plan Outcome - Aggregate plan outcome observed by a progress listener.
- Value
Error - A checked failure to resolve a value from a run’s store.
Traits§
- DryRun
Policy - Decides how each operation behaves during dry-run.
- Progress
Listener - Observes progress while a plan is described, dry-run, or executed.
Type Aliases§
- BoxFuture
- Runtime-independent boxed future used by operation executors.