pub struct ClientBuilder { /* private fields */ }Implementations§
Source§impl ClientBuilder
impl ClientBuilder
pub fn new(host: impl Into<String>, port: u16) -> Self
pub fn from_url(url: &str) -> Result<Self, Error>
pub fn transport(self, transport: Transport) -> Self
Sourcepub fn tls_config(self, config: Arc<ClientConfig>) -> Self
pub fn tls_config(self, config: Arc<ClientConfig>) -> Self
Set the TLS configuration from a pre-built rustls::ClientConfig.
For a higher-level API, see tls.
Sourcepub fn tls(self, config: TlsConfig) -> Result<Self, Error>
pub fn tls(self, config: TlsConfig) -> Result<Self, Error>
Build and set the TLS configuration from a TlsConfig.
Returns Err if certificate loading fails.
pub fn connect_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
pub fn base_dn(self, base_dn: impl Into<String>) -> Self
pub fn service_account( self, dn: impl Into<String>, password: SecretString, ) -> Self
pub fn referral_policy(self, policy: ReferralPolicy) -> Self
Sourcepub fn max_message_size(self, max: u32) -> Self
pub fn max_message_size(self, max: u32) -> Self
Set the maximum accepted LDAP message size (10 MiB by default).
Sourcepub fn on_unsolicited_notification(
self,
handler: impl Fn(&ExtendedResponse) + Send + Sync + 'static,
) -> Self
pub fn on_unsolicited_notification( self, handler: impl Fn(&ExtendedResponse) + Send + Sync + 'static, ) -> Self
Register a callback for unsolicited notifications (message-id 0) other
than the Notice of Disconnection. The default handler logs the event at
debug level.
pub async fn connect(self) -> Result<Client, Error>
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more