Skip to main content

Crate poprako_orchestra

Crate poprako_orchestra 

Source
Expand description

§poprako-orchestra — Transaction Abstraction Framework

Provides a layered set of traits for composing and executing transactional operations against an abstract backend (a “nucleus”). The crate decouples three concerns:

  • What to do: described by the oper::Oper trait, which carries the operation’s input data and declares its Output type.
  • How to do it: described by the step::Step trait, which receives an Oper and a mutable context, executes the operation, and returns the output.
  • Where to run it: described by the nucl::Nucl trait, which provides a managed context scope where the application can execute arbitrary async logic with proper error discrimination (backend errors vs. step-execution errors).

§Layering

Oper and Step together form the semantic layer — they model what your application does inside a transaction. Nucl is the back-end layer — it models the transactional engine (e.g. a database connection pool, a saga coordinator) that provides the context and handles commit / rollback.

Re-exports§

pub use nucl::Nucl;
pub use oper::Oper;
pub use step::Run;
pub use step::Step;
pub use proxy::Proxy;

Modules§

nucl
Defines the Nucl trait — the transactional nucleus that provides a managed execution context and coordinates application logic inside it.
oper
Defines the Oper trait — the “what” of a transactional operation.
proxy
step
Defines the Step and Run traits — the “how” of a transactional (or non-transactional) operation.

Macros§

run_proxy
Builds a proxy that dispatches operations through Run.
step_proxy
Builds a proxy that dispatches operations through Step.