| Crates.io | tryiter |
| lib.rs | tryiter |
| version | 0.6.0 |
| created_at | 2024-11-06 23:46:36.619711+00 |
| updated_at | 2025-01-10 17:42:40.631382+00 |
| description | Utility functions for Iterators of Results |
| homepage | |
| repository | https://github.com/carlsverre/tryiter |
| max_upload_size | |
| id | 1439316 |
| size | 45,809 |
Utility functions for Iterators of Results. This crate is heavily inspired by TryStreamExt in the futures crate as well as Yoshua Wuyts post on Fallible Iterator Adapters.
TryIteratorExtThis crate exports a trait called TryIteratorExt which provides utility methods on top of any Iterator which returns a Result. TryIteratorExt is automatically implemented on top of compatible Iterators via a generic impl so all you have to do is import the trait and start calling methods on your iterators.
The methods provide two fundamental simplifications over regular Iterator methods:
Ok or Err values, passing through the other values transparently.Err.See tests/sanity.rs for a quick overview of using this crate.
This crate is still pre-1.0 and will be until someone wants to use it in production. If you want to use it before that point please pin a specific version number and be prepared for breaking changes.