Skip to main content

WithLoop

Trait WithLoop 

Source
pub trait WithLoop: ExactSizeIterator + Sized {
    // Provided method
    fn with_loop(self) -> LoopIter<Self> { ... }
}
Expand description

.with_loop() - wraps any iterator whose length is known up front (ExactSizeIterator, satisfied by .iter() on a Vec/slice/ HashMap, .iter().enumerate() over one of those, and more) into one yielding (item, Loop) pairs.

Provided Methods§

Source

fn with_loop(self) -> LoopIter<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§