Skip to main content

Begin

Trait Begin 

Source
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§

Source

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".

Implementations on Foreign Types§

Source§

impl<B: Begin + ?Sized> Begin for &B

Source§

impl<B: Begin + ?Sized> Begin for Arc<B>

Implementors§