Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi all
I have only recently started developing with Rust, so I may not be very proficient in Rust yet.
I want to implement a process-level connection pool, but I found that the type of the connection pool return value implemented using the built-in pool function of diesel_sync is very strange?
The above is just the code under development. I just want to get a variable of type AsyncPgConnection from the connection pool.
How can I accomplish this?
now the type of return value is
Object<AsyncDieselConnectionManager<>AsyncPgConnection>
I have try use
.defer
method. but the lifecycle issues can't be sloved.Is it because the connection pool needs to be managed that this wrapper is added? However, if the connection pool method needs to pass in this wrapper, it will be really ugly and inconvenient to test.
Beta Was this translation helpful? Give feedback.
All reactions