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]
impl Ldap
[src]
fn add<S: AsRef<str> + Eq + Hash>(
&self,
dn: &str,
attrs: Vec<(S, HashSet<S>)>
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self,
dn: &str,
attrs: Vec<(S, HashSet<S>)>
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
See LdapConn::add()
.
impl Ldap
[src]
fn simple_bind(
&self,
bind_dn: &str,
bind_pw: &str
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self,
bind_dn: &str,
bind_pw: &str
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
fn sasl_external_bind(
&self
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
impl Ldap
[src]
fn compare<B: AsRef<[u8]>>(
&self,
dn: &str,
attr: &str,
val: B
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self,
dn: &str,
attr: &str,
val: B
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
See LdapConn::compare()
.
impl Ldap
[src]
fn delete(
&self,
dn: &str
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self,
dn: &str
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
See LdapConn::delete()
.
impl Ldap
[src]
fn extended<E>(
&self,
exop: E
) -> Box<Future<Item = (LdapResult, Exop, Vec<Control>), Error = Error>> where
Vec<Tag>: From<E>,
&self,
exop: E
) -> Box<Future<Item = (LdapResult, Exop, Vec<Control>), Error = Error>> where
Vec<Tag>: From<E>,
See LdapConn::extended()
.
impl Ldap
[src]
fn connect(
addr: &SocketAddr,
handle: &Handle
) -> Box<Future<Item = Ldap, Error = Error>>
addr: &SocketAddr,
handle: &Handle
) -> 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
.
fn connect_ssl(
addr: &str,
handle: &Handle
) -> Box<Future<Item = Ldap, Error = Error>>
addr: &str,
handle: &Handle
) -> 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
. 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(&self, ctrls: Vec<StructureTag>) -> &Self
impl Ldap
[src]
fn modify<S: AsRef<str> + Eq + Hash>(
&self,
dn: &str,
mods: Vec<Mod<S>>
) -> Box<Future<Item = (LdapResult, Vec<Control>), Error = Error>>
&self,
dn: &str,
mods: Vec<Mod<S>>
) -> Box<Future<Item = (LdapResult, Vec<Control>), 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, Vec<Control>), Error = Error>>
&self,
dn: &str,
rdn: &str,
delete_old: bool,
new_sup: Option<&str>
) -> Box<Future<Item = (LdapResult, Vec<Control>), 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 = (SearchStream, Receiver<(LdapResult, Vec<Control>)>), Error = Error>>
&self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Box<Future<Item = (SearchStream, Receiver<(LdapResult, Vec<Control>)>), Error = Error>>
See LdapConn::search()
.
The returned future resolves to a pair consisting of a SearchStream
,
which should be iterated through to obtain results, and a receiver future which will yield the
overall result of the search after the stream is drained. They should be polled concurrently
with Future::join()
.
The true synchronous counterpart of this method is not the identically named LdapConn::search()
,
but rather LdapConn::streaming_search()
.
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 = (Tag, Vec<Control>)
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.