[−][src]Struct r2d2_ldap::LDAPConnectionManager
An r2d2::ManageConnection
for ldap3::LdapConn
s.
Example
use std::thread; use r2d2_ldap::LDAPConnectionManager; fn main() { let pool = r2d2::Pool::new(LDAPConnectionManager("ldap://example.org")).unwrap(); for i in 0..10i32 { let pool = pool.clone(); thread::spawn(move || { let mut ldap = pool.get().unwrap(); ldap.simple_bind("uid=john,cn=users,dc=example,dc=org", "password").unwrap(); }); } }
Trait Implementations
impl ManageConnection for LDAPConnectionManager
[src]
type Connection = LdapConn
The connection type this manager deals with.
type Error = LdapError
The error type returned by Connection
s.
fn connect(&self) -> Result<LdapConn, LdapError>
[src]
fn is_valid(&self, conn: &mut LdapConn) -> Result<(), LdapError>
[src]
fn has_broken(&self, conn: &mut LdapConn) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for LDAPConnectionManager
impl Send for LDAPConnectionManager
impl Sync for LDAPConnectionManager
impl Unpin for LDAPConnectionManager
impl UnwindSafe for LDAPConnectionManager
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,