Macro run_async

Source
macro_rules! run_async {
    ($logic_fn:expr, $hub:expr) => { ... };
}
Expand description

Executes asynchronously a given logic function without transaction control.

This macro sets up local data sources, runs the provided closure, and then cleans up the DataHub’s session resources. It does not perform commit or rollback operations.

§Parameters

  • logic_fn: A closure that encapsulates the business logic to be executed. It takes a mutable reference to DataHub as an argument.
  • hub: A hub struct instance for data input/output operations.

§Returns

  • Result<(), Err>: The result of the logic function’s execution, or an error if executing logic_fn fails.