pub struct RegenerationRate {
pub amount: f64,
pub per_minutes: i64,
}Expand description
How much quota returns, and over what period.
Fields§
§amount: f64Amount replenished per period, in the SAME units as used_count and
total_count on the window. Not integral by contract: unlike a count, a
rate is legitimately fractional (a monthly grant read per hour).
per_minutes: i64Length of the replenishment period in minutes.
Distinct from the window’s own window_minutes, which they need not
match: an observed payload states a 720h refill period on a balance whose
percentage is measured against a larger total that includes a purchased
pool that never refills.
Trait Implementations§
Source§impl Clone for RegenerationRate
impl Clone for RegenerationRate
Source§impl Debug for RegenerationRate
impl Debug for RegenerationRate
Source§impl<'de> Deserialize<'de> for RegenerationRate
impl<'de> Deserialize<'de> for RegenerationRate
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 PartialEq for RegenerationRate
impl PartialEq for RegenerationRate
Source§impl Serialize for RegenerationRate
impl Serialize for RegenerationRate
impl StructuralPartialEq for RegenerationRate
Auto Trait Implementations§
impl Freeze for RegenerationRate
impl RefUnwindSafe for RegenerationRate
impl Send for RegenerationRate
impl Sync for RegenerationRate
impl Unpin for RegenerationRate
impl UnsafeUnpin for RegenerationRate
impl UnwindSafe for RegenerationRate
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