[][src]Struct std::slice::ArrayWindows

pub struct ArrayWindows<'a, T, const N: usize> where
    T: 'a, 
{ /* fields omitted */ }
🔬 This is a nightly-only experimental API. (array_windows #75027)

A windowed iterator over a slice in overlapping chunks (N elements at a time), starting at the beginning of the slice

This struct is created by the array_windows method on slices.

Example

#![feature(array_windows)]

let slice = [0, 1, 2, 3];
let iter = slice.array_windows::<2>();
Run

Trait Implementations

impl<'a, T, const N: usize> Clone for ArrayWindows<'a, T, N> where
    T: 'a + Clone
[src]

impl<'a, T, const N: usize> Copy for ArrayWindows<'a, T, N> where
    T: 'a + Copy
[src]

impl<'a, T, const N: usize> Debug for ArrayWindows<'a, T, N> where
    T: 'a + Debug
[src]

impl<'a, T, const N: usize> DoubleEndedIterator for ArrayWindows<'a, T, N>[src]

impl<'_, T, const N: usize> ExactSizeIterator for ArrayWindows<'_, T, N>[src]

impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N>[src]

type Item = &'a [T; N]

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, T, const N: usize> RefUnwindSafe for ArrayWindows<'a, T, N> where
    T: RefUnwindSafe

impl<'a, T, const N: usize> !Send for ArrayWindows<'a, T, N>

impl<'a, T, const N: usize> !Sync for ArrayWindows<'a, T, N>

impl<'a, T, const N: usize> Unpin for ArrayWindows<'a, T, N>

impl<'a, T, const N: usize> UnwindSafe for ArrayWindows<'a, T, N> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.