tryiter

Crates.iotryiter
lib.rstryiter
version
sourcesrc
created_at2024-11-06 23:46:36.619711+00
updated_at2025-01-10 17:42:40.631382+00
descriptionUtility functions for Iterators of Results
homepage
repositoryhttps://github.com/carlsverre/tryiter
max_upload_size
id1439316
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Carl Sverre (carlsverre)

documentation

README

tryiter

docs.rs crates.io Build Status

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.

TryIteratorExt

This 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:

  1. They operate directly on Ok or Err values, passing through the other values transparently.
  2. They take in fallible closures which can return Err.

See tests/sanity.rs for a quick overview of using this crate.

Release Stability

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.

Commit count: 18

cargo fmt