Skip to main content

BeginWithExt

Trait BeginWithExt 

Source
pub trait BeginWithExt: BeginWith {
    // Provided method
    fn within_with<T, E, F>(
        &self,
        opts: TxOptions,
        f: F,
    ) -> impl Future<Output = Result<T, E>>
       where F: AsyncFnOnce(&Transaction) -> Result<T, E>,
             E: From<ExecError> { ... }
}
Expand description

BeginExt::within with options.

Provided Methods§

Source

fn within_with<T, E, F>( &self, opts: TxOptions, f: F, ) -> impl Future<Output = Result<T, E>>
where F: AsyncFnOnce(&Transaction) -> Result<T, E>, E: From<ExecError>,

Run f inside a fresh transaction opened with opts.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§