@@ -48,43 +48,43 @@ pub struct PoolOptions<DB: Database> {
48
48
pub ( crate ) before_connect : Option <
49
49
Arc <
50
50
dyn Fn (
51
- & <DB :: Connection as Connection >:: Options ,
52
- u32 ,
53
- )
54
- -> BoxFuture < ' _ , Result < Cow < ' _ , <DB :: Connection as Connection >:: Options > , Error > >
55
- + ' static
56
- + Send
57
- + Sync ,
51
+ & <DB :: Connection as Connection >:: Options ,
52
+ u32 ,
53
+ )
54
+ -> BoxFuture < ' _ , Result < Cow < ' _ , <DB :: Connection as Connection >:: Options > , Error > >
55
+ + ' static
56
+ + Send
57
+ + Sync ,
58
58
> ,
59
59
> ,
60
60
pub ( crate ) after_connect : Option <
61
61
Arc <
62
62
dyn Fn ( & mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' _ , Result < ( ) , Error > >
63
- + ' static
64
- + Send
65
- + Sync ,
63
+ + ' static
64
+ + Send
65
+ + Sync ,
66
66
> ,
67
67
> ,
68
68
pub ( crate ) before_acquire : Option <
69
69
Arc <
70
70
dyn Fn (
71
- & mut DB :: Connection ,
72
- PoolConnectionMetadata ,
73
- ) -> BoxFuture < ' _ , Result < bool , Error > >
74
- + ' static
75
- + Send
76
- + Sync ,
71
+ & mut DB :: Connection ,
72
+ PoolConnectionMetadata ,
73
+ ) -> BoxFuture < ' _ , Result < bool , Error > >
74
+ + ' static
75
+ + Send
76
+ + Sync ,
77
77
> ,
78
78
> ,
79
79
pub ( crate ) after_release : Option <
80
80
Arc <
81
81
dyn Fn (
82
- & mut DB :: Connection ,
83
- PoolConnectionMetadata ,
84
- ) -> BoxFuture < ' _ , Result < bool , Error > >
85
- + ' static
86
- + Send
87
- + Sync ,
82
+ & mut DB :: Connection ,
83
+ PoolConnectionMetadata ,
84
+ ) -> BoxFuture < ' _ , Result < bool , Error > >
85
+ + ' static
86
+ + Send
87
+ + Sync ,
88
88
> ,
89
89
> ,
90
90
pub ( crate ) max_connections : u32 ,
@@ -389,14 +389,14 @@ impl<DB: Database> PoolOptions<DB> {
389
389
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
390
390
pub fn before_connect < F > ( mut self , callback : F ) -> Self
391
391
where
392
- for < ' c > F : Fn (
393
- & ' c <DB :: Connection as Connection >:: Options ,
394
- u32 ,
395
- )
396
- -> BoxFuture < ' c , crate :: Result < Cow < ' c , <DB :: Connection as Connection >:: Options > > >
397
- + ' static
398
- + Send
399
- + Sync ,
392
+ for < ' c > F : Fn (
393
+ & ' c <DB :: Connection as Connection >:: Options ,
394
+ u32 ,
395
+ )
396
+ -> BoxFuture < ' c , crate :: Result < Cow < ' c , <DB :: Connection as Connection >:: Options > > >
397
+ + ' static
398
+ + Send
399
+ + Sync ,
400
400
{
401
401
self . before_connect = Some ( Arc :: new ( callback) ) ;
402
402
self
@@ -442,12 +442,12 @@ impl<DB: Database> PoolOptions<DB> {
442
442
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
443
443
pub fn after_connect < F > ( mut self , callback : F ) -> Self
444
444
where
445
- // We're passing the `PoolConnectionMetadata` here mostly for future-proofing.
446
- // `age` and `idle_for` are obviously not useful for fresh connections.
447
- for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < ( ) , Error > >
448
- + ' static
449
- + Send
450
- + Sync ,
445
+ // We're passing the `PoolConnectionMetadata` here mostly for future-proofing.
446
+ // `age` and `idle_for` are obviously not useful for fresh connections.
447
+ for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < ( ) , Error > >
448
+ + ' static
449
+ + Send
450
+ + Sync ,
451
451
{
452
452
self . after_connect = Some ( Arc :: new ( callback) ) ;
453
453
self
@@ -497,10 +497,10 @@ impl<DB: Database> PoolOptions<DB> {
497
497
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
498
498
pub fn before_acquire < F > ( mut self , callback : F ) -> Self
499
499
where
500
- for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < bool , Error > >
501
- + ' static
502
- + Send
503
- + Sync ,
500
+ for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < bool , Error > >
501
+ + ' static
502
+ + Send
503
+ + Sync ,
504
504
{
505
505
self . before_acquire = Some ( Arc :: new ( callback) ) ;
506
506
self
@@ -554,10 +554,10 @@ impl<DB: Database> PoolOptions<DB> {
554
554
/// # }
555
555
pub fn after_release < F > ( mut self , callback : F ) -> Self
556
556
where
557
- for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < bool , Error > >
558
- + ' static
559
- + Send
560
- + Sync ,
557
+ for < ' c > F : Fn ( & ' c mut DB :: Connection , PoolConnectionMetadata ) -> BoxFuture < ' c , Result < bool , Error > >
558
+ + ' static
559
+ + Send
560
+ + Sync ,
561
561
{
562
562
self . after_release = Some ( Arc :: new ( callback) ) ;
563
563
self
@@ -656,4 +656,4 @@ impl<DB: Database> Debug for PoolOptions<DB> {
656
656
. field ( "test_before_acquire" , & self . test_before_acquire )
657
657
. finish ( )
658
658
}
659
- }
659
+ }
0 commit comments