Enumerate

Struct Enumerate 

Source
pub struct Enumerate<Inner> { /* private fields */ }
Expand description

This struct is created by the enumerate() method on ExactParallelSourceExt.

You most likely won’t need to interact with this struct directly, as it implements the ExactParallelSource and ExactParallelSourceExt traits, but it is nonetheless public because of the must_use annotation.

Trait Implementations§

Source§

impl<Inner: ExactParallelSource> ExactParallelSource for Enumerate<Inner>

Source§

type Item = (usize, <Inner as ExactParallelSource>::Item)

The type of items that this parallel source produces. Read more
Source§

fn exact_descriptor( self, ) -> impl ExactSourceDescriptor<Item = Self::Item> + Sync

Returns an object that describes how to fetch items from this source.

Auto Trait Implementations§

§

impl<Inner> Freeze for Enumerate<Inner>
where Inner: Freeze,

§

impl<Inner> RefUnwindSafe for Enumerate<Inner>
where Inner: RefUnwindSafe,

§

impl<Inner> Send for Enumerate<Inner>
where Inner: Send,

§

impl<Inner> Sync for Enumerate<Inner>
where Inner: Sync,

§

impl<Inner> Unpin for Enumerate<Inner>
where Inner: Unpin,

§

impl<Inner> UnwindSafe for Enumerate<Inner>
where Inner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> ExactParallelSourceExt for T

Source§

fn chain<T: ExactParallelSource<Item = Self::Item>>( self, next: T, ) -> Chain<Self, T>

Returns a parallel source that produces items from this source followed by items from the next source. Read more
Source§

fn enumerate(self) -> Enumerate<Self>

Returns a parallel source that produces pairs of (index, item) for the items of this source. Read more
Source§

fn rev(self) -> Rev<Self>

Returns a parallel source that produces items from this source in reverse order. Read more
Source§

fn skip(self, n: usize) -> Skip<Self>

Returns a parallel source that skips the first n items from this source, or all the items if this source has fewer than n items, and produces the remaining items. Read more
Source§

fn skip_exact(self, n: usize) -> SkipExact<Self>

Returns a parallel source that skips the first n items from this source, panicking if this source has fewer than n items, and produces the remaining items. Read more
Source§

fn step_by(self, n: usize) -> StepBy<Self>

Returns a parallel source that produces every n-th item from this source, starting with the first one. Read more
Source§

fn take(self, n: usize) -> Take<Self>

Returns a parallel source that produces the first n items from this source, or all the items if this source has fewer than n items. Read more
Source§

fn take_exact(self, n: usize) -> TakeExact<Self>

Returns a parallel source that produces the first n items from this source, panicking if this source has fewer than n items. Read more
Source§

fn with_thread_pool<T: GenericThreadPool>( self, thread_pool: T, ) -> BaseExactParallelIterator<T, Self>

Attaches the given GenericThreadPool to this ExactParallelSource and obtain a ParallelIterator. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.