pub trait TxFnExpander: Send + Sync {
// Required method
fn expand(&self, db: &Db, forms: Vec<Edn>) -> Result<Vec<Edn>, String>;
}Expand description
Expands user database-function invocations in boundary EDN transaction
forms before native conversion. The built-in implementation is
crate::txfn::DbFnExpander on the bounded cljrs-tx runtime (feature
cljrs, on by default, ADR-0008); embedders may inject their own.
Required Methods§
Sourcefn expand(&self, db: &Db, forms: Vec<Edn>) -> Result<Vec<Edn>, String>
fn expand(&self, db: &Db, forms: Vec<Edn>) -> Result<Vec<Edn>, String>
Rewrites forms with every [:my/fn arg…] invocation replaced by
the function’s returned tx-data (recursively).
§Errors
Returns a display message when a function is missing, rejected by the sandbox, fails, or exceeds its budget; the transaction aborts.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".