pub struct RateLimitWireInterceptor { /* private fields */ }Expand description
Rate-limits incoming envelopes using a fixed-window counter.
Tracks the number of envelopes received in the current time window. Envelopes that exceed the rate are rejected (not just delayed), ensuring the configured limit is actually enforced.
Implementations§
Trait Implementations§
Source§impl WireInterceptor for RateLimitWireInterceptor
impl WireInterceptor for RateLimitWireInterceptor
Source§fn on_receive(&self, _envelope: &WireEnvelope) -> WireDisposition
fn on_receive(&self, _envelope: &WireEnvelope) -> WireDisposition
Inspect an incoming wire envelope and decide what to do with it. Read more
Auto Trait Implementations§
impl !Freeze for RateLimitWireInterceptor
impl RefUnwindSafe for RateLimitWireInterceptor
impl Send for RateLimitWireInterceptor
impl Sync for RateLimitWireInterceptor
impl Unpin for RateLimitWireInterceptor
impl UnsafeUnpin for RateLimitWireInterceptor
impl UnwindSafe for RateLimitWireInterceptor
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