Skip to main content

DbConnectionInterceptor

Trait DbConnectionInterceptor 

Source
pub trait DbConnectionInterceptor:
    Send
    + Sync
    + 'static {
    // Required method
    fn intercept_checkout<'a>(
        &'a self,
        ctx: DbCheckoutContext,
        next: Pin<Box<dyn Future<Output = Result<PooledConnection, AutumnError>> + Send + 'a>>,
    ) -> Pin<Box<dyn Future<Output = Result<PooledConnection, AutumnError>> + Send + 'a>>;

    // Provided method
    fn is_transactional_test(&self) -> bool { ... }
}

Required Methods§

Source

fn intercept_checkout<'a>( &'a self, ctx: DbCheckoutContext, next: Pin<Box<dyn Future<Output = Result<PooledConnection, AutumnError>> + Send + 'a>>, ) -> Pin<Box<dyn Future<Output = Result<PooledConnection, AutumnError>> + Send + 'a>>

Provided Methods§

Source

fn is_transactional_test(&self) -> bool

Returns whether this interceptor enables transactional test isolation mode.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§