pub trait Begin: Executor {
// Required method
fn begin(&self) -> ExecFuture<'_, Result<Transaction, ExecError>>;
}Expand description
Something a transaction can be begun on: a pool or a connection.
Deliberately not implemented by Transaction — nesting is spelled
Transaction::savepoint, so “did I open a transaction or a savepoint?”
cannot be confused at a call site.
Required Methods§
Sourcefn begin(&self) -> ExecFuture<'_, Result<Transaction, ExecError>>
fn begin(&self) -> ExecFuture<'_, Result<Transaction, ExecError>>
Open a transaction on a connection this executor owns or checks out.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".