To span a transaction over two functions, it has to be assigned to some variable and the lifetime of this variable is tracked by the compiler.
[1] https://docs.rs/sqlx/0.3.0/sqlx/struct.Transaction.html