pub struct AbuseEvent {
pub reason: AbuseReason,
pub scope: String,
pub client: IpAddr,
pub retry_after_secs: u64,
}Expand description
A refused request, as logged.
Fields§
§reason: AbuseReasonThe limit that refused it.
scope: StringWhat was counted: client, route:<name> or global.
client: IpAddrThe client address.
retry_after_secs: u64Seconds until the window resets, at least 1.
Implementations§
Source§impl AbuseEvent
impl AbuseEvent
Sourcepub fn to_log_line(&self) -> String
pub fn to_log_line(&self) -> String
One key=value line, the form written to the log.
Trait Implementations§
Source§impl Clone for AbuseEvent
impl Clone for AbuseEvent
Source§impl Debug for AbuseEvent
impl Debug for AbuseEvent
impl Eq for AbuseEvent
Source§impl PartialEq for AbuseEvent
impl PartialEq for AbuseEvent
impl StructuralPartialEq for AbuseEvent
Auto Trait Implementations§
impl Forget for AbuseEvent
impl Freeze for AbuseEvent
impl RefUnwindSafe for AbuseEvent
impl Send for AbuseEvent
impl Sync for AbuseEvent
impl Unpin for AbuseEvent
impl UnsafeUnpin for AbuseEvent
impl UnwindSafe for AbuseEvent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.