pub async fn atomically<F, T>(f: F) -> T where
    F: Fn() -> StmResult<T>, 
Expand description

Create a new transaction and run f until it returns a successful result and can be committed without running into version conflicts.

Make sure f is free of any side effects, because it can be called repeatedly.