IntoOneTimeExecutorAt

Trait IntoOneTimeExecutorAt 

Source
pub trait IntoOneTimeExecutorAt<'c> {
    type Executor: PgExecutor<'c>;

    // Required method
    fn into_executor(self) -> OneTimeExecutor<'c, Self::Executor>
       where Self: 'c;
}
Expand description

A trait to signify that we can use an argument for 1 round trip to the database

Auto implemented on all &mut AtomicOperation types and &sqlx::PgPool.

Required Associated Types§

Source

type Executor: PgExecutor<'c>

The concrete executor type.

Required Methods§

Source

fn into_executor(self) -> OneTimeExecutor<'c, Self::Executor>
where Self: 'c,

Transforms into a OneTimeExecutor which can be used to execute a round trip.

Implementations on Foreign Types§

Source§

impl<'c> IntoOneTimeExecutorAt<'c> for &PgPool

Source§

type Executor = &'c Pool<Postgres>

Source§

fn into_executor(self) -> OneTimeExecutor<'c, Self::Executor>
where Self: 'c,

Source§

impl<'c, O> IntoOneTimeExecutorAt<'c> for &mut O
where O: AtomicOperation,

Source§

type Executor = &'c mut PgConnection

Source§

fn into_executor(self) -> OneTimeExecutor<'c, Self::Executor>
where Self: 'c,

Implementors§

Source§

impl<'c, E> IntoOneTimeExecutorAt<'c> for OneTimeExecutor<'c, E>
where E: PgExecutor<'c> + 'c,