[][src]Struct r2d2_ldap::LDAPConnectionManager

pub struct LDAPConnectionManager(pub &'static str);

An r2d2::ManageConnection for ldap3::LdapConns.

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 Connections.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.