Closed andrewbanchich closed 4 years ago
Are you using the synchronous or the asynchronous API?
sync, but only because the docs show LdapConnAsync
also returns a normal ldap3::Ldap
, which is what we search with.
Ah, I just noticed the docs say Ldap
can be cloned, so I assume that's the proper way of handling this. Feel free to close this if so.
Thanks! 😄
Heh, seems I'm late with the response :wink: Yes, Ldap
is cheap to clone on purpose, and it's the proper way to obtain a new handle.
I am trying to make an LDAP connection and then use it concurrently to make search requests, however I'm not able to because all search APIs take
&mut self
. Is there any way this could be changed so that a connection can be shared across concurrent tasks?