Skip to main content

ThrottledStream

Trait ThrottledStream 

Source
pub trait ThrottledStream {
    // Provided method
    fn throttle(self, pool: ThrottlePool) -> Throttled<Self>
       where Self: Stream + Sized { ... }
}
Expand description

Provides a throttle() method on all Stream’s.

Provided Methods§

Source

fn throttle(self, pool: ThrottlePool) -> Throttled<Self>
where Self: Stream + Sized,

Returns a new stream, which throttles items from the original stream, according to the rate defined by pool.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§