Struct Fold

#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Fold<I, ID, F> { /* private fields */ }

Fold is an iterator that applies a function over an iterator producing a single value. This struct is created by the fold() method on ParallelIterator

Trait Implementations

impl<I: Clone, ID: Clone, F: Clone> Clone for Fold<I, ID, F>

fn clone(&self) -> Self

impl<I: Debug, ID, F> Debug for Fold<I, ID, F>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<U, I, ID, F> ParallelIterator for Fold<I, ID, F> where I: ParallelIterator, F: Fn(U, I::Item) -> U + Sync + Send, ID: Fn() -> U + Sync + Send, U: Send,

type Item = U;
fn drive_unindexed<C>(self, consumer: C) -> C::Result
where
    C: UnindexedConsumer<Self::Item>,

Auto Trait Implementations

impl<I, ID, F> Freeze for Fold<I, ID, F> where I: Freeze, ID: Freeze, F: Freeze,

impl<I, ID, F> RefUnwindSafe for Fold<I, ID, F> where I: RefUnwindSafe, ID: RefUnwindSafe, F: RefUnwindSafe,

impl<I, ID, F> Send for Fold<I, ID, F> where I: Send, ID: Send, F: Send,

impl<I, ID, F> Sync for Fold<I, ID, F> where I: Sync, ID: Sync, F: Sync,

impl<I, ID, F> Unpin for Fold<I, ID, F> where I: Unpin, ID: Unpin, F: Unpin,

impl<I, ID, F> UnsafeUnpin for Fold<I, ID, F> where I: UnsafeUnpin, ID: UnsafeUnpin, F: UnsafeUnpin,

impl<I, ID, F> UnwindSafe for Fold<I, ID, F> where I: UnwindSafe, ID: UnwindSafe, F: UnwindSafe,

Blanket Implementations

impl<T> Any for Fold<I, ID, F> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Fold<I, ID, F> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Fold<I, ID, F> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Fold<I, ID, F> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Fold<I, ID, F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for Fold<I, ID, F>

impl<T> IntoParallelIterator for Fold<I, ID, F> where T: ParallelIterator,

type Iter = T;
type Item = <T as ParallelIterator>::Item;
fn into_par_iter(self) -> T

impl<T> Pointable for Fold<I, ID, F>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> ToOwned for Fold<I, ID, F> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Fold<I, ID, F> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Fold<I, ID, F> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Fold<I, ID, F> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>