pub trait Handler<C>{
// Provided methods
fn max_channels_per_key<K, KF>(
self,
n: u32,
keymaker: KF,
) -> ChannelFilter<Self, K, KF>
where K: Display + Eq + Hash + Clone + Unpin,
KF: Fn(&C) -> K { ... }
fn max_concurrent_requests_per_channel(
self,
n: usize,
) -> ThrottlerStream<Self> { ... }
}
Expand description
A utility trait enabling a stream to fluently chain a request handler.
Provided Methods§
Sourcefn max_channels_per_key<K, KF>(
self,
n: u32,
keymaker: KF,
) -> ChannelFilter<Self, K, KF>
fn max_channels_per_key<K, KF>( self, n: u32, keymaker: KF, ) -> ChannelFilter<Self, K, KF>
Enforces channel per-key limits.
Sourcefn max_concurrent_requests_per_channel(self, n: usize) -> ThrottlerStream<Self>
fn max_concurrent_requests_per_channel(self, n: usize) -> ThrottlerStream<Self>
Caps the number of concurrent requests per channel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.