pub trait StreamRateLimitExt: Stream {
// Provided method
fn rate_limit(self, opt: RateLimitOptions<'_>) -> RateLimit<'_, Self>
where Self: Sized { ... }
}
Expand description
import this trait to use rate_limit
method on streams implementing futures_core::stream::Stream
Provided Methods§
sourcefn rate_limit(self, opt: RateLimitOptions<'_>) -> RateLimit<'_, Self>where
Self: Sized,
fn rate_limit(self, opt: RateLimitOptions<'_>) -> RateLimit<'_, Self>where
Self: Sized,
Rate limits the stream, behaviour depends on RateLimitOptions
passed as argument