stream_throttle

Provides a Rust Stream combinator, to limit the rate at which items are produced.

Crates.io

Key Features

Example throttling of Stream

```rust let rate = ThrottleRate::new(5, Duration::new(2, 0)); let pool = ThrottlePool::new(rate, Timer::default());

stream::repeat(()) .throttle(pool) .wait(); ```

Example throttling of Future

```rust let rate = ThrottleRate::new(5, Duration::new(2, 0)); let pool = ThrottlePool::new(rate, Timer::default());

pool.queue() .andthen(|| Ok(())) .wait(); ```