pub async fn tx<T, E, I, S, F>(
pool: &Pool,
savepoint: S,
f: F,
) -> Result<T, Error<E>>where
I: Into<Error<E>>,
S: AsRef<str>,
for<'a> F: Fn(&'a Transaction<'a>) -> AsyncResult<'a, T, I>,
Expand description
Executes the closure which is retried for serialization failures.
ยงErrors
Will return Err
if there are any database errors or if the retry closure
returns Err
.