Skip to main content

StridedIteratorMap

Trait StridedIteratorMap 

Source
pub trait StridedIteratorMap: Sized {
    // Provided method
    fn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
       where F: Fn(T) -> U + Sync + Send + 'a,
             U: CommonBounds,
             Self: IterGetSet<Item = T> { ... }
}
Expand description

A trait to map a function on the elements of an iterator.

Provided Methods§

Source

fn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
where F: Fn(T) -> U + Sync + Send + 'a, U: CommonBounds, Self: IterGetSet<Item = T>,

Transforms the strided iterators by applying a provided function to their items.

This method allows for element-wise operations on the zipped iterators by applying func to each item.

§Type Parameters
  • 'a - The lifetime associated with the iterators.
  • F - The function to apply to each item.
  • U - The output type after applying the function.
§Arguments
  • f - A function that takes an item from the zipped iterator and returns a transformed value.
§Returns

A StridedMap instance that applies the provided function during iteration.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§