pub struct KeyRateLimit {
pub limit_per_window: u64,
pub window_secs: u64,
}
Expand description
Produce rate limit configuration for a topic.
Fields§
§limit_per_window: u64
Limit each partition key to N messages per window_secs
.
window_secs: u64
The size of the window to record counters for.
Larger windows imply higher memory usage.
Trait Implementations§
Source§impl Clone for KeyRateLimit
impl Clone for KeyRateLimit
Source§fn clone(&self) -> KeyRateLimit
fn clone(&self) -> KeyRateLimit
Returns a copy of the value. Read more
1.0.0 · 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 KeyRateLimit
impl Debug for KeyRateLimit
Source§impl<'de> Deserialize<'de> for KeyRateLimit
impl<'de> Deserialize<'de> for KeyRateLimit
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
Source§impl Serialize for KeyRateLimit
impl Serialize for KeyRateLimit
impl Copy for KeyRateLimit
Auto Trait Implementations§
impl Freeze for KeyRateLimit
impl RefUnwindSafe for KeyRateLimit
impl Send for KeyRateLimit
impl Sync for KeyRateLimit
impl Unpin for KeyRateLimit
impl UnwindSafe for KeyRateLimit
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