Crates.io | r2d2-ldap |
lib.rs | r2d2-ldap |
version | 0.1.1 |
source | src |
created_at | 2020-11-02 17:51:03.154384 |
updated_at | 2020-11-02 18:08:28.661319 |
description | LDAP support for the r2d2 connection pool |
homepage | |
repository | https://github.com/c0dearm/r2d2-ldap |
max_upload_size | |
id | 307996 |
size | 5,002 |
LDAP support for the r2d2 connection pool
Add this to your Cargo.toml
:
[dependencies]
r2d2-ldap = "0.1.1"
use std::thread;
use r2d2_ldap::LDAPConnectionManager;
fn main() {
let pool = r2d2::Pool::new(LDAPConnectionManager("ldap://example.org")).unwrap();
let mut ldap = pool.get().unwrap();
ldap.simple_bind("uid=john,cn=users,dc=example,dc=org", "password").unwrap();
}