collections::slice::Chunks - Rust
Description: API documentation for the Rust `Chunks` struct in crate `collections`.
Keywords: rust, rustlang, rust-lang, Chunks

# Struct collections::slice::Chunks 1.0.0 [−] [src]

    pub struct Chunks<'a, T> where
        T: 'a,  { /* fields omitted */ }

An iterator over a slice in (non-overlapping) chunks (`size` elements at a time).

When the slice len is not evenly divided by the chunk size, the last slice of the iteration will be the remainder.

This struct is created by the `chunks` method on slices.

## Trait Implementations

### `impl<'a, T> ExactSizeIterator for Chunks<'a, T>`
[src]

### `impl<'a, T> Debug for Chunks<'a, T> where
T: 'a + Debug,`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>`
[src]

Formats the value using the given formatter.

### `impl<'a, T> Clone for Chunks<'a, T>`
[src]

#### `fn clone(&self) -> Chunks<'a, T>`
[src]

### `impl<'a, T> Iterator for Chunks<'a, T>`
[src]

#### `type Item = &'a [T]`

#### `fn next(&mut self) -> Option<&'a [T]>`
[src]

#### `fn size_hint(&self) -> (usize, Option<usize>)`
[src]

#### `fn count(self) -> usize`
[src]

#### `fn nth(&mut self, n: usize) -> Option<<Chunks<'a, T> as Iterator>::Item>`
[src]

#### `fn last(self) -> Option<<Chunks<'a, T> as Iterator>::Item>`
[src]

### `impl<'a, T> FusedIterator for Chunks<'a, T>`
[src]

### `impl<'a, T> DoubleEndedIterator for Chunks<'a, T>`
[src]

#### `fn next_back(&mut self) -> Option<&'a [T]>`
[src]

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)