Struct Inspect
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Inspect<I, F> { /* private fields */ }
Inspect is an iterator that calls a function with a reference to each
element before yielding it.
This struct is created by the inspect() method on ParallelIterator
Trait Implementations
impl<I, F> IndexedParallelIterator for Inspect<I, F>
where
I: IndexedParallelIterator,
F: Fn(&I::Item) + Sync + Send,
fn drive<C>(self, consumer: C) -> C::Result where C: Consumer<Self::Item>,fn len(&self) -> usizefn with_producer<CB>(self, callback: CB) -> CB::Output where CB: ProducerCallback<Self::Item>,
impl<I, F> ParallelIterator for Inspect<I, F>
where
I: ParallelIterator,
F: Fn(&I::Item) + Sync + Send,
type Item = <I as ParallelIterator>::Item;fn drive_unindexed<C>(self, consumer: C) -> C::Result where C: UnindexedConsumer<Self::Item>,fn opt_len(&self) -> Option<usize>
impl<I: Clone, F: Clone> Clone for Inspect<I, F>
fn clone(&self) -> Inspect<I, F>
impl<I: Debug, F> Debug for Inspect<I, F>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<I, F> Freeze for Inspect<I, F>
where
I: Freeze,
F: Freeze,
impl<I, F> RefUnwindSafe for Inspect<I, F>
where
I: RefUnwindSafe,
F: RefUnwindSafe,
impl<I, F> Send for Inspect<I, F>
where
I: Send,
F: Send,
impl<I, F> Sync for Inspect<I, F>
where
I: Sync,
F: Sync,
impl<I, F> Unpin for Inspect<I, F>
where
I: Unpin,
F: Unpin,
impl<I, F> UnsafeUnpin for Inspect<I, F>
where
I: UnsafeUnpin,
F: UnsafeUnpin,
impl<I, F> UnwindSafe for Inspect<I, F>
where
I: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for Inspect<I, F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Inspect<I, F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Inspect<I, F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Inspect<I, F>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Inspect<I, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for Inspect<I, F>
impl<T> IntoParallelIterator for Inspect<I, F>
where
T: ParallelIterator,
type Iter = T;type Item = <T as ParallelIterator>::Item;fn into_par_iter(self) -> T
impl<T> Pointable for Inspect<I, F>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for Inspect<I, F>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Inspect<I, F>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Inspect<I, F>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Inspect<I, F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>