Struct ldap3::Ldap
[−]
[src]
pub struct Ldap { /* fields omitted */ }
LDAP connection. *
This is a low-level structure representing an LDAP connection, which
provides methods returning futures of various LDAP operations. Inherent
methods for opening a connection themselves return futures which,
if successfully resolved, yield the structure instance. That instance
can be clone()
d if the connection should be reused for multiple
operations.
All methods on an instance of this structure, except with_*
, return
a future which must be polled inside some futures chain to obtain the
appropriate result. The synchronous interface provides methods with
exactly the same name and parameters, and identical semantics. Differences
in expected use are noted where they exist, such as the search()
method.
Methods
impl Ldap
[src]
fn abandon(&self, msgid: i32) -> Box<Future<Item = (), Error = Error>>
Abandon the request identified by msgid
. Since this requires knowing the
msgid
of an operation, it currently works only for synchronous and
and asynchronous streaming searches, invoked via methods on structures
representing those searches. See EntryStream::abandon()
and SearchStream::get_abandon_channel()
.
impl Ldap
[src]
fn add<S: AsRef<str> + Eq + Hash>(
&self,
dn: &str,
attrs: Vec<(S, HashSet<S>)>
) -> Box<Future<Item = LdapResult, Error = Error>>
&self,
dn: &str,
attrs: Vec<(S, HashSet<S>)>
) -> Box<Future<Item = LdapResult, Error = Error>>
See LdapConn::add()
.
impl Ldap
[src]
fn simple_bind(
&self,
bind_dn: &str,
bind_pw: &str
) -> Box<Future<Item = LdapResult, Error = Error>>
&self,
bind_dn: &str,
bind_pw: &str
) -> Box<Future<Item = LdapResult, Error = Error>>
fn sasl_external_bind(&self) -> Box<Future<Item = LdapResult, Error = Error>>
impl Ldap
[src]
fn compare<B: AsRef<[u8]>>(
&self,
dn: &str,
attr: &str,
val: B
) -> Box<Future<Item = CompareResult, Error = Error>>
&self,
dn: &str,
attr: &str,
val: B
) -> Box<Future<Item = CompareResult, Error = Error>>
See LdapConn::compare()
.
impl Ldap
[src]
fn delete(&self, dn: &str) -> Box<Future<Item = LdapResult, Error = Error>>
See LdapConn::delete()
.
impl Ldap
[src]
fn extended<E>(&self, exop: E) -> Box<Future<Item = ExopResult, Error = Error>> where
E: Into<Exop>,
E: Into<Exop>,
See LdapConn::extended()
.
impl Ldap
[src]
fn connect(
addr: &SocketAddr,
handle: &Handle,
timeout: Option<Duration>
) -> Box<Future<Item = Ldap, Error = Error>>
addr: &SocketAddr,
handle: &Handle,
timeout: Option<Duration>
) -> Box<Future<Item = Ldap, Error = Error>>
Connect to an LDAP server without using TLS, using an IP address/port number
in addr
, and an event loop handle in handle
. If timeout
is not None
,
it specifies how long the connection attempt will take before returning an
error.
fn connect_ssl(
addr: &str,
handle: &Handle,
timeout: Option<Duration>
) -> Box<Future<Item = Ldap, Error = Error>>
addr: &str,
handle: &Handle,
timeout: Option<Duration>
) -> Box<Future<Item = Ldap, Error = Error>>
Connect to an LDAP server with an attempt to negotiate TLS immediately after
establishing the TCP connection, using the host name and port number in addr
,
and an event loop handle in handle
. If timeout
is not None
, it specifies
how long the connection attempt will take before returning an error.
The connection must be by host name for TLS hostname check to work.
fn connect_unix<P: AsRef<Path>>(
path: P,
handle: &Handle
) -> Box<Future<Item = Ldap, Error = Error>>
path: P,
handle: &Handle
) -> Box<Future<Item = Ldap, Error = Error>>
Connect to an LDAP server through a Unix domain socket, using the path
in path
, and an event loop handle in handle
.
fn with_search_options(&self, opts: SearchOptions) -> &Self
fn with_controls<V: IntoRawControlVec>(&self, ctrls: V) -> &Self
fn with_timeout(&self, duration: Duration) -> &Self
impl Ldap
[src]
fn modify<S: AsRef<str> + Eq + Hash>(
&self,
dn: &str,
mods: Vec<Mod<S>>
) -> Box<Future<Item = LdapResult, Error = Error>>
&self,
dn: &str,
mods: Vec<Mod<S>>
) -> Box<Future<Item = LdapResult, Error = Error>>
See LdapConn::modify()
.
impl Ldap
[src]
fn modifydn(
&self,
dn: &str,
rdn: &str,
delete_old: bool,
new_sup: Option<&str>
) -> Box<Future<Item = LdapResult, Error = Error>>
&self,
dn: &str,
rdn: &str,
delete_old: bool,
new_sup: Option<&str>
) -> Box<Future<Item = LdapResult, Error = Error>>
See LdapConn::modifydn()
.
impl Ldap
[src]
fn search<S: AsRef<str>>(
&self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Box<Future<Item = SearchResult, Error = Error>>
&self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Box<Future<Item = SearchResult, Error = Error>>
See LdapConn::search()
.
fn streaming_search<S: AsRef<str>>(
&self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Box<Future<Item = SearchStream, Error = Error>>
&self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Box<Future<Item = SearchStream, Error = Error>>
See also LdapConn::streaming_search()
.
The returned future resolves to a SearchStream
,
which should be iterated through to obtain results. Before starting the iteration,
the receiver future, which will yield the overall result of the search after the stream
is drained, should be retrieved from the stream instance with get_result_rx()
. The stream and the receiver should be polled concurrently
with Future::join()
.
impl Ldap
[src]
Trait Implementations
impl Clone for Ldap
[src]
fn clone(&self) -> Ldap
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Service for Ldap
[src]
type Request = LdapOp
Requests handled by the service.
type Response = LdapResponse
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Box<Future<Item = Self::Response, Error = Error>>
The future response value.
fn call(&self, req: Self::Request) -> Self::Future
Process the request and return the response asynchronously.