with_tx_dropped

Function with_tx_dropped 

Source
pub fn with_tx_dropped<T, E>(
    conn: &mut Connection,
    f: impl FnOnce(&mut Transaction<'_>) -> Result<T, E>,
) -> Result<T, E>
where E: From<Error>,
Expand description

Short-hand for constructing a transaction, providing it as an argument to the given function, then dropping the transaction before returning.