Struct orx_concurrent_iter::NextManyExact

source ·
pub struct NextManyExact<T, Iter>
where Iter: ExactSizeIterator<Item = T>,
{ /* private fields */ }
Expand description

A NextChunk implementation with a begin index and an ExactSizeIterator iterator with known length.

Implementations§

source§

impl<T, Iter: ExactSizeIterator<Item = T>> NextManyExact<T, Iter>

source

pub fn exact_len(&self) -> usize

Exact length of the chunk which is less than or equal to the requested chunk size.

source

pub fn is_empty(&self) -> bool

Returns whether or not the chunk is empty.

Trait Implementations§

source§

impl<T: Debug, Iter> Debug for NextManyExact<T, Iter>
where Iter: ExactSizeIterator<Item = T> + Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<T, Iter: ExactSizeIterator<Item = T>> NextChunk<T> for NextManyExact<T, Iter>

§

type ChunkIter = Iter

Type of the iterator yielding elements of the chunk.
source§

fn values(self) -> Self::ChunkIter

Elements in the obtained chunk.
source§

fn begin_idx(&self) -> usize

The index of the first element to be yielded by the values iterator.

Auto Trait Implementations§

§

impl<T, Iter> Freeze for NextManyExact<T, Iter>
where Iter: Freeze,

§

impl<T, Iter> RefUnwindSafe for NextManyExact<T, Iter>
where Iter: RefUnwindSafe,

§

impl<T, Iter> Send for NextManyExact<T, Iter>
where Iter: Send,

§

impl<T, Iter> Sync for NextManyExact<T, Iter>
where Iter: Sync,

§

impl<T, Iter> Unpin for NextManyExact<T, Iter>
where Iter: Unpin,

§

impl<T, Iter> UnwindSafe for NextManyExact<T, Iter>
where Iter: 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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.