Crate try_iterator

Source
Expand description

CrateGitHubDocs

Implements the TryIterator trait, which will add the following fallible methods to Iterator:

§Motivation

This crate was born out of necessity of a fallible version for the Iterator::position method. A StackOverflow question was asked, but, contrary to the analog try_for_each, the solution was rather cumbersome. This resulted in this issue in the Rust repository, and finally this crate.

Until the standard library adds these fallible methods – if ever –, they are available in this crate.

§Usage

Add the dependency in your Cargo.toml:

[dependencies]
try-iterator = { version = "1.0.0" }

Then import the prelude at the top of your source files:

use try_iterator::prelude::*;

The new methods will be automatically present in Iterator.

Modules§

prelude
This prelude is intended to be a glob import to all your modules that make use the library: