Struct ldap3::LdapConnBuilder
[−]
[src]
pub struct LdapConnBuilder<T> { /* fields omitted */ }
Helper for creating a customized LDAP connection.
This struct must be instantiated by explicitly specifying the
marker type, which is one of LdapConn
or LdapConnAsync
.
Example
use std::time::Duration; use ldap3::LdapConnBuilder; let ldap = LdapConnBuilder::<LdapConn>::new() .with_conn_timeout(Duration::from_secs(10)) .connect("ldap://localhost:2389")?;
Methods
impl<T> LdapConnBuilder<T>
[src]
fn with_conn_timeout(self, timeout: Duration) -> Self
Set the network timeout for this connection. This parameter will be ignored for Unix domain socket connections.
impl LdapConnBuilder<LdapConn>
[src]
fn new() -> LdapConnBuilder<LdapConn>
Create a helper instance which will eventually produce a synchronous LDAP connection.
fn connect(self, url: &str) -> Result<LdapConn>
Create a synchronous LDAP connection from this helper.
impl LdapConnBuilder<LdapConnAsync>
[src]
fn new() -> LdapConnBuilder<LdapConnAsync>
Create a helper instance which will eventually produce an asynchronous LDAP connection.
fn connect(self, url: &str, handle: &Handle) -> Result<LdapConnAsync>
Create an asynchronous LDAP connection from this helper.