Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streaming_search() -> iterator #114

Closed
Heiko-Zelt opened this issue Oct 26, 2023 · 1 comment
Closed

streaming_search() -> iterator #114

Heiko-Zelt opened this issue Oct 26, 2023 · 1 comment

Comments

@Heiko-Zelt
Copy link

Hello guys,

I need to map the result entries of a streaming_search(). I am new to rust/tokio and the ldap3 crate. I wonder, why doesn't streaming_search() return an iterator? So it would be easy to use in a for-in-loop or to map(), filter(), collect() the results.

Or how could I map the results or convert SearchStream into an iterator? Is there a code example?

Kind regards
Heiko

@inejge
Copy link
Owner

inejge commented Oct 27, 2023

Async iterators as such are still an unresolved question on the language level (see rust-lang/rust#79024). Search streams in LDAP are a simpler use case, but I wouldn't like to tie the library to some construct which might be incompatible with a later solution. Future directions notwithstanding, SearchStream can't be integrated with a regular iterator because its methods are async.

@inejge inejge closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants