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§
Sourcefn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
fn map<'a, T, F, U>(self, f: F) -> StridedMap<'a, Self, T, F>
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", so this trait is not object safe.