transaction
Starts a new transaction in Core Crypto. If the callback succeeds, it will be committed, otherwise, every operation performed with the context will be discarded.
When calling this function from within Rust, async functions accepting a context implement CoreCryptoCommand
, so operations can be defined inline as follows:
core_crypto.transaction(Arc::new(async |context| {
// your implementation here
Ok(())
}))?;
Content copied to clipboard