IntoReadahead

Trait IntoReadahead 

Source
pub trait IntoReadahead<T>
where T: Send + 'static,
{ // Required method fn readahead(self, buffer_size: usize) -> Readahead<T> where Self: Send + 'static; }
Expand description

Adds a .readahead(buffer_size) method to any iterator.

use readahead_iterator::IntoReadahead;

let c = "Some input data".chars()
    .readahead(10)
    .filter(|c| c.is_alphabetic())
    .count();

Required Methods§

Source

fn readahead(self, buffer_size: usize) -> Readahead<T>
where Self: Send + 'static,

Apply a readahead adaptor to an iterator.

buffer_size is the maximum number of buffered items.

Implementors§

Source§

impl<I, T> IntoReadahead<T> for I
where T: Send + 'static, I: Iterator<Item = T>,