pub struct LimiterMiddleware {
pub messages_per_second: f64,
}Expand description
Throughput limiter middleware configuration.
Applies a best-effort pacing delay so an endpoint does not exceed the configured message rate. For batch operations the limiter accounts for the number of messages in the batch, not just the batch count.
Fields§
§messages_per_second: f64Target throughput in messages per second. Must be greater than zero.
Trait Implementations§
Source§impl Clone for LimiterMiddleware
impl Clone for LimiterMiddleware
Source§fn clone(&self) -> LimiterMiddleware
fn clone(&self) -> LimiterMiddleware
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LimiterMiddleware
impl Debug for LimiterMiddleware
Source§impl<'de> Deserialize<'de> for LimiterMiddleware
impl<'de> Deserialize<'de> for LimiterMiddleware
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LimiterMiddleware
impl RefUnwindSafe for LimiterMiddleware
impl Send for LimiterMiddleware
impl Sync for LimiterMiddleware
impl Unpin for LimiterMiddleware
impl UnsafeUnpin for LimiterMiddleware
impl UnwindSafe for LimiterMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more