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

# Struct collections::str::Bytes 1.0.0 [−] [src]

    pub struct Bytes<'a>(_);

An iterator over the bytes of a string slice.

This struct is created by the `bytes` method on `str`. See its documentation for more.

## Trait Implementations

### `impl<'a> ExactSizeIterator for Bytes<'a>`
[src]

#### `fn len(&self) -> usize`

#### `fn is_empty(&self) -> bool`

### `impl<'a> Clone for Bytes<'a>`
[src]

#### `fn clone(&self) -> Bytes<'a>`

### `impl<'a> Debug for Bytes<'a>`
[src]

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

Formats the value using the given formatter.

### `impl<'a> Iterator for Bytes<'a>`
[src]

#### `type Item = u8`

#### `fn next(&mut self) -> Option<u8>`

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

#### `fn count(self) -> usize`

#### `fn last(self) -> Option<<Bytes<'a> as Iterator>::Item>`

#### `fn nth(&mut self, n: usize) -> Option<<Bytes<'a> as Iterator>::Item>`

#### `fn all<F>(&mut self, f: F) -> bool where
F: FnMut(<Bytes<'a> as Iterator>::Item) -> bool,`

#### `fn any<F>(&mut self, f: F) -> bool where
F: FnMut(<Bytes<'a> as Iterator>::Item) -> bool,`

#### `fn find<P>(&mut self, predicate: P) -> Option<<Bytes<'a> as Iterator>::Item> where
P: FnMut(&<Bytes<'a> as Iterator>::Item) -> bool,`

#### `fn position<P>(&mut self, predicate: P) -> Option<usize> where
P: FnMut(<Bytes<'a> as Iterator>::Item) -> bool,`

#### `fn rposition<P>(&mut self, predicate: P) -> Option<usize> where
P: FnMut(<Bytes<'a> as Iterator>::Item) -> bool,`

### `impl<'a> FusedIterator for Bytes<'a>`
[src]

### `impl<'a> DoubleEndedIterator for Bytes<'a>`
[src]

#### `fn next_back(&mut self) -> Option<u8>`

#### `fn rfind<P>(&mut self, predicate: P) -> Option<<Bytes<'a> as Iterator>::Item> where
P: FnMut(&<Bytes<'a> as Iterator>::Item) -> bool,`

# 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`)