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

From iterator? #7

Open
matthiasbeyer opened this issue Jul 7, 2020 · 0 comments
Open

From iterator? #7

matthiasbeyer opened this issue Jul 7, 2020 · 0 comments

Comments

@matthiasbeyer
Copy link

Would be nice if there would be an option to build the AsyncView from an iterator, with optional progress bar of course.

Something like:

AsyncView::from_iterator(it)

with from_iterator(i: I) where I: IntoIterator<Item = V>, V: View or something like this?
Or even

AsyncView::fold_from_iter(it, ListView::new(), |accu, elem| { accu.add_child("", elem); accu });

where the closure folds over the ListView and elem as element from the iterator?

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

1 participant