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§
fn next_uw(&mut self) -> Self::Item
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.