# Are there plans to add more try\_\*\* methods for iter::iterator?

**URL:** <https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374>\
**Category:** libs\
**Created:** [February 19, 2023, 6:59am UTC](https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374 "2023-02-19T06:59:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suxiaogang223](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/suxiaogang223/32/10576_2.png) [@suxiaogang223](https://internals.rust-lang.org/u/suxiaogang223)\
**Post date:** [February 19, 2023, 6:59am UTC](https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374/1 "2023-02-19T06:59:16Z")

</div>

With the implementation of [try\_find](https://github.com/rust-lang/rust/issues/63178), it is easy to achieve more try\_\*\* methods like:

```rust
fn try_all<F, R>(
    &mut self,
    f: F
) -> <<R as Try>::Residual as Residual<bool>>::TryType
where
    Self: Sized,
    F: FnMut(&Self::Item) -> R,
    R: Try<Output = bool>,
    <R as Try>::Residual: Residual<bool>,

```

---

<div class="post-metadata">

**Author:** ![scottmcm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/scottmcm/32/2355_2.png) [@scottmcm](https://internals.rust-lang.org/u/scottmcm)\
**Post date:** [February 19, 2023, 7:10am UTC](https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374/2 "2023-02-19T07:10:58Z")

</div>

See the conversation in [RFC: add `try_all` and `try_any` to `Iterator` by FlixCoder · Pull Request #3233 · rust-lang/rfcs · GitHub](https://github.com/rust-lang/rfcs/pull/3233)

---

<div class="post-metadata">

**Author:** ![suxiaogang223](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/suxiaogang223/32/10576_2.png) [@suxiaogang223](https://internals.rust-lang.org/u/suxiaogang223)\
**Post date:** [February 19, 2023, 7:25am UTC](https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374/3 "2023-02-19T07:25:03Z")

</div>

thank you, that's what I want

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [May 20, 2023, 7:26am UTC](https://internals.rust-lang.org/t/are-there-plans-to-add-more-try-methods-for-iter-iterator/18374/4 "2023-05-20T07:26:02Z")

</div>

Closed on May 20, 2023, 7:26am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
