Skip to main content

ConstSizeIntoIterator

Trait ConstSizeIntoIterator 

Source
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§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§