[−][src]Struct ldap3::LdapConn
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]
settings: LdapConnSettings,
url: &Url
) -> Result<Self>
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]
See Ldap::with_timeout()
.
pub fn simple_bind(
&mut self,
bind_dn: &str,
bind_pw: &str
) -> Result<LdapResult>
[src]
&mut self,
bind_dn: &str,
bind_pw: &str
) -> Result<LdapResult>
See Ldap::simple_bind()
.
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]
&mut self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Result<SearchResult>
See Ldap::search()
.
pub fn streaming_search<'a, 'b, S: AsRef<str> + Send + Sync + 'a>(
&'b mut self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Result<EntryStream<'a, 'b, S>>
[src]
&'b mut self,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Result<EntryStream<'a, 'b, S>>
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]
&'b mut self,
adapters: V,
base: &str,
scope: Scope,
filter: &str,
attrs: Vec<S>
) -> Result<EntryStream<'a, 'b, S>>
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]
&mut self,
dn: &str,
attrs: Vec<(S, HashSet<S>)>
) -> Result<LdapResult>
See Ldap::add()
.
pub fn compare<B: AsRef<[u8]>>(
&mut self,
dn: &str,
attr: &str,
val: B
) -> Result<CompareResult>
[src]
&mut self,
dn: &str,
attr: &str,
val: B
) -> Result<CompareResult>
See Ldap::compare()
.
pub fn delete(&mut self, dn: &str) -> Result<LdapResult>
[src]
See Ldap::delete()
.
pub fn modify<S: AsRef<[u8]> + Eq + Hash>(
&mut self,
dn: &str,
mods: Vec<Mod<S>>
) -> Result<LdapResult>
[src]
&mut self,
dn: &str,
mods: Vec<Mod<S>>
) -> Result<LdapResult>
See Ldap::modify()
.
pub fn modifydn(
&mut self,
dn: &str,
rdn: &str,
delete_old: bool,
new_sup: Option<&str>
) -> Result<LdapResult>
[src]
&mut self,
dn: &str,
rdn: &str,
delete_old: bool,
new_sup: Option<&str>
) -> Result<LdapResult>
See Ldap::modifydn()
.
pub fn unbind(&mut self) -> Result<()>
[src]
See Ldap::unbind()
.
pub fn extended<E>(&mut self, exop: E) -> Result<ExopResult> where
E: Into<Exop>,
[src]
E: Into<Exop>,
See Ldap::extended()
.
pub fn last_id(&mut self) -> RequestId
[src]
See Ldap::last_id()
.
pub fn abandon(&mut self, msgid: RequestId) -> Result<()>
[src]
See Ldap::abandon()
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for LdapConn
[src]
impl Send for LdapConn
[src]
impl Sync for LdapConn
[src]
impl Unpin for LdapConn
[src]
impl !UnwindSafe for LdapConn
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,