pub struct MlsEventRateLimiter { /* private fields */ }Expand description
Best-effort fixed-window limiter to reduce high-volume failure event floods.
Thin wrapper around CategorySampler that maps MLS lifecycle events to
rate-limit keys.
Implementations§
Source§impl MlsEventRateLimiter
impl MlsEventRateLimiter
Sourcepub fn should_emit(&self, event: &MlsLifecycleEvent) -> bool
pub fn should_emit(&self, event: &MlsLifecycleEvent) -> bool
Returns true if the event passes rate limiting.
Trait Implementations§
Source§impl Debug for MlsEventRateLimiter
impl Debug for MlsEventRateLimiter
Source§impl Default for MlsEventRateLimiter
impl Default for MlsEventRateLimiter
Source§fn default() -> MlsEventRateLimiter
fn default() -> MlsEventRateLimiter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MlsEventRateLimiter
impl RefUnwindSafe for MlsEventRateLimiter
impl Send for MlsEventRateLimiter
impl Sync for MlsEventRateLimiter
impl Unpin for MlsEventRateLimiter
impl UnsafeUnpin for MlsEventRateLimiter
impl UnwindSafe for MlsEventRateLimiter
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
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more