Struct ldap3::EntryStream
source · pub struct EntryStream<'a, 'b, S, A> { /* private fields */ }
sync
only.Expand description
Handle for obtaining a stream of search results.
User code can’t construct a stream directly, but only by using
streaming_search()
or
streaming_search_with()
on
an LdapConn
handle.
For compatibility, this struct’s name is different from the async version
which is SearchStream
. The protocol and behavior
are the same, with one important difference: an EntryStream
shares the
Tokio runtime with LdapConn
from which it’s obtained, but the two can’t be
used in parallel, which is enforced by capturing the reference to LdapConn
during the lifetime of EntryStream
.
Implementations§
source§impl<'a, 'b, S, A> EntryStream<'a, 'b, S, A>where
S: AsRef<str> + Send + Sync + 'a,
A: AsRef<[S]> + Send + Sync + 'a,
impl<'a, 'b, S, A> EntryStream<'a, 'b, S, A>where S: AsRef<str> + Send + Sync + 'a, A: AsRef<[S]> + Send + Sync + 'a,
sourcepub fn next(&mut self) -> Result<Option<ResultEntry>>
pub fn next(&mut self) -> Result<Option<ResultEntry>>
See SearchStream::next()
.
sourcepub fn result(self) -> LdapResult
pub fn result(self) -> LdapResult
The name result()
was kept for backwards compatibility.
sourcepub fn last_id(&mut self) -> RequestId
pub fn last_id(&mut self) -> RequestId
Returns the Message ID of the initial Search.
This method calls Ldap::last_id()
on the Ldap
handle encapsulated by the underlying stream.