Rent v0.8.15
Rent v0.8.15 makes application transaction helpers easier to compose. Transaction methods accept ordinary async callbacks, including callbacks that borrow local values or return borrowed results. Query and mutation execution retain their compiler boundaries.
Simpler transaction helpers
Ordinary transaction calls keep their syntax:
let post_count = client
.transaction(async |tx| tx.post().count().await)
.await?;A generic helper can forward a callback using an AsyncFnOnce bound. It no longer needs
AsyncCallback or explicit higher-ranked lifetime bounds solely to call a Rent transaction.
The same contract applies to application-error transactions and test transactions. Retry
helpers retain their callable requirements without imposing blanket Send bounds.
See generic transaction helpers for a complete forwarding example.
Thread safety follows the calling context
Like other async Rust functions, a transaction produces a Send future when its captured
state, callback future, and values retained across suspension allow it. Code that moves
the future between worker threads must still satisfy Send. Local work can use local-only
state such as Rc.
Applications can remove callback traits and extra bounds introduced solely to satisfy
v0.8.14's transaction contract. Keep bounds required by the application's own threading
interfaces, and keep Clone where application retry logic uses it. Query and mutation
execution, including custom projection values and outputs, retain their existing Send
requirements.
Upgrade
Pin the SDK, extension crates and CLI to v0.8.15, regenerate the client, and commit the application lockfile. No schema migration is needed for this change. No feature flag or opt-in is required.
Transaction methods now return ordinary async futures instead of the concrete RentFuture
alias. If a forwarding helper explicitly returns RentFuture, make it an ordinary async
function, or retain an explicit boxed boundary with the bounds its own API requires.
The AsyncCallback export remains available for existing code.
