[][src]Struct ldap3::LdapConn

pub struct LdapConn { /* fields omitted */ }

Synchronous connection to an LDAP server.

In this version of the interface, new() will return a struct encapsulating a runtime, the connection, and an operation handle. All operations are performed through that struct, synchronously: the thread will wait until the result is available or the operation times out.

The API is virtually identical to the asynchronous one. The chief difference is that LdapConn is not cloneable: if you need another handle, you must open a new connection.

Implementations

impl LdapConn[src]

pub fn new(url: &str) -> Result<Self>[src]

Open a connection to an LDAP server specified by url.

See LdapConnAsync::new() for the details of the supported URL formats.

pub fn with_settings(settings: LdapConnSettings, url: &str) -> Result<Self>[src]

Open a connection to an LDAP server specified by url, using settings to specify additional parameters.

pub fn from_url(url: &Url) -> Result<Self>[src]

Open a connection to an LDAP server specified by an already parsed Url.

pub fn from_url_with_settings(
    settings: LdapConnSettings,
    url: &Url
) -> Result<Self>
[src]

Open a connection to an LDAP server specified by url, using settings to specify additional parameters.

pub fn with_search_options(&mut self, opts: SearchOptions) -> &mut Self[src]

pub fn with_controls<V: IntoRawControlVec>(&mut self, ctrls: V) -> &mut Self[src]

pub fn with_timeout(&mut self, duration: Duration) -> &mut Self[src]

pub fn simple_bind(
    &mut self,
    bind_dn: &str,
    bind_pw: &str
) -> Result<LdapResult>
[src]

pub fn sasl_external_bind(&mut self) -> Result<LdapResult>[src]

pub fn search<'a, S: AsRef<str> + Send + Sync + 'a>(
    &mut self,
    base: &str,
    scope: Scope,
    filter: &str,
    attrs: Vec<S>
) -> Result<SearchResult>
[src]

Perform a Search, but unlike search(), which returns all results at once, return a handle which will be used for retrieving entries one by one. See EntryStream for the explanation of the protocol which must be adhered to in this case.

pub fn streaming_search_with<'a, 'b, V: IntoAdapterVec<'a, S>, S: AsRef<str> + Send + Sync + 'a>(
    &'b mut self,
    adapters: V,
    base: &str,
    scope: Scope,
    filter: &str,
    attrs: Vec<S>
) -> Result<EntryStream<'a, 'b, S>>
[src]

Perform a streaming Search internally modified by a chain of adapters. See Ldap::streaming_search_with().

pub fn add<S: AsRef<[u8]> + Eq + Hash>(
    &mut self,
    dn: &str,
    attrs: Vec<(S, HashSet<S>)>
) -> Result<LdapResult>
[src]

pub fn compare<B: AsRef<[u8]>>(
    &mut self,
    dn: &str,
    attr: &str,
    val: B
) -> Result<CompareResult>
[src]

pub fn delete(&mut self, dn: &str) -> Result<LdapResult>[src]

pub fn modify<S: AsRef<[u8]> + Eq + Hash>(
    &mut self,
    dn: &str,
    mods: Vec<Mod<S>>
) -> Result<LdapResult>
[src]

pub fn modifydn(
    &mut self,
    dn: &str,
    rdn: &str,
    delete_old: bool,
    new_sup: Option<&str>
) -> Result<LdapResult>
[src]

pub fn unbind(&mut self) -> Result<()>[src]

pub fn extended<E>(&mut self, exop: E) -> Result<ExopResult> where
    E: Into<Exop>, 
[src]

pub fn last_id(&mut self) -> RequestId[src]

pub fn abandon(&mut self, msgid: RequestId) -> Result<()>[src]

Trait Implementations

impl Debug for LdapConn[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.