Function with_tx

Source
pub async fn with_tx<'a, F, R, E, DB>(
    pool: &Pool<DB>,
    callback: F,
) -> Result<R, E>
where F: for<'r> FnOnce(&'r mut Transaction<'_, DB>) -> ScopedBoxFuture<'a, 'r, Result<R, E>> + Send + 'a + 'static, E: From<Error> + Send + 'a, R: Send + 'a, DB: Database,