Skip to main content

InTx

Trait InTx 

Source
pub trait InTx<'a, DB: Dialect> {
    // Required method
    fn in_tx(self, tx: &'a SharedTx<DB>) -> Self;
}
Expand description

auth.api().in_tx(&tx): server API calls on an app’s SharedTx.

Required Methods§

Source

fn in_tx(self, tx: &'a SharedTx<DB>) -> Self

Runs every call of this Api on tx, each inside its own savepoint: a call that fails rolls back its own writes and leaves tx as it was. Events wait for SharedTx::commit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, DB: Dialect> InTx<'a, DB> for Api<'a, Sqlx<DB>>

Source§

fn in_tx(self, tx: &'a SharedTx<DB>) -> Self

Implementors§