Trait IterUnwrap

Source
pub trait IterUnwrap {
    type Item;

    // Required methods
    fn next_uw(&mut self) -> Self::Item;
    fn collect_n<const N: usize>(&mut self) -> [Self::Item; N];
}
Expand description

Provides methods on iterators to reduce allocations and .unwrap() calls when success is assumed.

Required Associated Types§

Required Methods§

Source

fn next_uw(&mut self) -> Self::Item

Source

fn collect_n<const N: usize>(&mut self) -> [Self::Item; N]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I> IterUnwrap for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item