c3p0_common 0.71.2

A good friend for r2d2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::error::C3p0Error;

use std::future::Future;

pub trait C3p0Pool: Clone + Send + Sync {
    type Tx;

    fn transaction<
        'a,
        T: Send,
        E: Send + From<C3p0Error>,
        F: Send + FnOnce(&'a mut Self::Tx) -> Fut,
        Fut: Send + Future<Output = Result<T, E>>,
    >(
        &'a self,
        tx: F,
    ) -> impl Future<Output = Result<T, E>> + Send;
}