Struct ldap3::LdapConnSettings
source · pub struct LdapConnSettings { /* private fields */ }
Expand description
Additional settings for an LDAP connection.
The structure is opaque for better extensibility. An instance with
default values is constructed by new()
, and all
available settings can be replaced through a builder-like interface,
by calling the appropriate functions.
Implementations§
source§impl LdapConnSettings
impl LdapConnSettings
sourcepub fn new() -> LdapConnSettings
pub fn new() -> LdapConnSettings
Create an instance of the structure with default settings.
sourcepub fn set_conn_timeout(self, timeout: Duration) -> Self
pub fn set_conn_timeout(self, timeout: Duration) -> Self
Set the connection timeout. If a connetion to the server can’t
be established before the timeout expires, an error will be
returned to the user. Defaults to None
, meaning an infinite
timeout.
sourcepub fn set_connector(self, connector: TlsConnector) -> Self
pub fn set_connector(self, connector: TlsConnector) -> Self
Set a custom TLS connector, which enables setting various options
when establishing a secure connection. The default of None
will
use a connector with default settings.
sourcepub fn set_starttls(self, starttls: bool) -> Self
pub fn set_starttls(self, starttls: bool) -> Self
If true
, use the StartTLS extended operation to establish a
secure connection. Defaults to false
.
sourcepub fn starttls(&self) -> bool
pub fn starttls(&self) -> bool
The starttls
settings indicates whether the StartTLS extended
operation will be used to establish a secure connection.
sourcepub fn set_no_tls_verify(self, no_tls_verify: bool) -> Self
pub fn set_no_tls_verify(self, no_tls_verify: bool) -> Self
If true
, try to establish a TLS connection without certificate
verification. Defaults to false
.
Trait Implementations§
source§impl Clone for LdapConnSettings
impl Clone for LdapConnSettings
source§fn clone(&self) -> LdapConnSettings
fn clone(&self) -> LdapConnSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more