-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only require &self for Connection::close #54
Comments
Hi, manually set I am not familar with |
So deadpool is a connection pool, it allows user to implement their own pool with whatever library if they implement the #[async_trait]
impl managed::Manager for Manager {
type Type = Connection;
type Error = amqprs::error::Error;
async fn create(&self) -> Result<Self::Type, Self::Error> {
Ok(Connection::open(&self.con_args).await?)
}
async fn recycle(&self, conn: &mut Self::Type) -> RecycleResult<Self::Error> {
todo!()
} Now the only method we are concerned here is
I am not entirely sure about what that means, can you please further elaborate? |
As I understand, you should not call you can read about new type pattern, see explanation |
Whoops, yes you are right I misunderstood what it means by |
That’s right |
if no more issue with it, I would close it in the near future |
Yes there is no more issue related to this topic, feel free to close it if you want to. |
I am currently trying to implement a connection pool for amqprs using
deadpool
, which only provides a &mut Connection for therecycle
method, so I would greatly appreciate if close only requires &self, or provide a way to manually setis_open
.The text was updated successfully, but these errors were encountered: