Struct ChunkBy

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

ChunkBy is the storage for the lazy grouping operation.

If the groups are consumed in their original order, or if each group is dropped without keeping it around, then ChunkBy uses no allocations. It needs allocations only if several group iterators are alive at the same time.

This type implements IntoIterator (it is not an iterator itself), because the group iterators need to borrow from this value. It should be stored in a local variable or temporary and iterated.

See .chunk_by() for more information.

Trait Implementations

impl<K, I, F> Debug for ChunkBy<K, I, F> where K: Debug, I: Iterator + Debug, I::Item: Debug,

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

Auto Trait Implementations

impl<K, I, F> !Freeze for ChunkBy<K, I, F>

impl<K, I, F> !RefUnwindSafe for ChunkBy<K, I, F>

impl<K, I, F> !Sync for ChunkBy<K, I, F>

impl<K, I, F> Send for ChunkBy<K, I, F> where RefCell<GroupInner<K, I, F>>: Send,

impl<K, I, F> Unpin for ChunkBy<K, I, F> where RefCell<GroupInner<K, I, F>>: Unpin,

impl<K, I, F> UnsafeUnpin for ChunkBy<K, I, F> where RefCell<GroupInner<K, I, F>>: UnsafeUnpin,

impl<K, I, F> UnwindSafe for ChunkBy<K, I, F> where RefCell<GroupInner<K, I, F>>: UnwindSafe,

Blanket Implementations

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ChunkBy<K, I, F> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ChunkBy<K, I, F> where T: ?Sized,

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

impl<T> From<T> for ChunkBy<K, I, F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for ChunkBy<K, I, F>

impl<T, U> Into<U> for ChunkBy<K, I, 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 ChunkBy<K, I, F> where U: Into<T>,

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

impl<T, U> TryInto<U> for ChunkBy<K, I, F> where U: TryFrom<T>,

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