pub trait ConstSizeIntoIterator: IntoIterator {
    const SIZE: usize;
}
Expand description

Implementors of this trait promise that all iterators they produce always produce the same number of elements. This number is given by the associated constant SIZE. Note that this trait should not be implemented for Iterators, since they can be iterated through, which changes the amount of elements they produce.

Required Associated Constants§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, const N: usize> ConstSizeIntoIterator for &[T; N]

source§

const SIZE: usize = N

source§

impl<T, const N: usize> ConstSizeIntoIterator for &mut [T; N]

source§

const SIZE: usize = N

source§

impl<T, const N: usize> ConstSizeIntoIterator for [T; N]

source§

const SIZE: usize = N

Implementors§