From 5fa5a6d82bcdba25fd4bfafad41830b9af7d6c00 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 19 Sep 2024 16:59:12 +0200 Subject: [PATCH] throttle: keep unused fields private --- crates/throttle/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/throttle/src/lib.rs b/crates/throttle/src/lib.rs index 937d3b19b..5e5d0319a 100644 --- a/crates/throttle/src/lib.rs +++ b/crates/throttle/src/lib.rs @@ -215,15 +215,15 @@ impl TryFrom<&str> for ThrottleSpec { #[derive(Debug, Eq, PartialEq, Serialize)] pub struct ThrottleResult { /// true if the action was limited - pub throttled: bool, + pub(crate) throttled: bool, /// The total limit of the key (max_burst + 1). This is equivalent to the common /// X-RateLimit-Limit HTTP header. - pub limit: u64, + pub(crate) limit: u64, /// The remaining limit of the key. Equivalent to X-RateLimit-Remaining. - pub remaining: u64, + pub(crate) remaining: u64, /// The number of seconds until the limit will reset to its maximum capacity. /// Equivalent to X-RateLimit-Reset. - pub reset_after: Duration, + pub(crate) reset_after: Duration, /// The number of seconds until the user should retry, but None if the action was /// allowed. Equivalent to Retry-After. pub retry_after: Option,