pub struct Bytes<'r, T> {
// some fields omitted
}An iterator that reads a single byte on each iteration,
until .read_byte() returns EndOfFile.
The Bytes may yield None and thus terminate
an iteration, but continue to yield elements if iteration
is attempted again.
Any error other than EndOfFile that is produced by the underlying Reader
is returned by the iterator and should be handled by the caller.
Methods
fn new(r: &'r mut R) -> Bytes<'r, R>
Constructs a new byte iterator from the given Reader instance.
Trait Implementations
fn chain<U: Iterator<A>>(self, other: U) -> Chain<Self, U>
fn zip<B, U: Iterator<B>>(self, other: U) -> Zip<Self, U>
fn map<B>(self, f: |A|: 'r -> B) -> Map<'r, A, B, Self>
fn filter<A>(self, predicate: |&A|: 'r -> bool) -> Filter<'r, A, Self>
fn filter_map<B>(self, f: |A|: 'r -> Option<B>) -> FilterMap<'r, A, B, Self>
fn skip_while<A>(self, predicate: |&A|: 'r -> bool) -> SkipWhile<'r, A, Self>
fn take_while<A>(self, predicate: |&A|: 'r -> bool) -> TakeWhile<'r, A, Self>
fn skip<A>(self, n: uint) -> Skip<Self>
fn take<A>(self, n: uint) -> Take<Self>
fn scan<St, B>(self, initial_state: St, f: |&mut St, A|: 'r -> Option<B>) -> Scan<'r, A, B, Self, St>
fn flat_map<B, U: Iterator<B>>(self, f: |A|: 'r -> U) -> FlatMap<'r, A, Self, U>
fn fuse<A>(self) -> Fuse<Self>
fn inspect<A>(self, f: |&A|: 'r) -> Inspect<'r, A, Self>
fn by_ref<A>(&'r mut self) -> ByRef<'r, Self>
fn advance<A>(&mut self, f: |A| -> bool) -> bool
fn nth<A>(&mut self, n: uint) -> Option<A>
fn last<A>(&mut self) -> Option<A>
fn fold<B>(&mut self, init: B, f: |B, A| -> B) -> B
fn count<A>(&mut self) -> uint
fn all<A>(&mut self, f: |A| -> bool) -> bool
fn any<A>(&mut self, f: |A| -> bool) -> bool
fn find<A>(&mut self, predicate: |&A| -> bool) -> Option<A>
fn max_by<B: Ord>(&mut self, f: |&A| -> B) -> Option<A>
fn min_by<B: Ord>(&mut self, f: |&A| -> B) -> Option<A>
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
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 (or str), enum,
trait, typedef (or
tdef).