pub struct QuotaModel {
pub capacity: f64,
pub refill_per_minute: f64,
}Expand description
A worker’s quota modeled as a refilling token bucket (CONTEXT.md §13).
The scheduler spreads load to avoid hitting limits. A subscription’s rate-limit window, an API tier’s RPM, and a free tier’s daily reset all map onto this one shape.
Fields§
§capacity: f64Maximum tokens (request units) the bucket holds.
refill_per_minute: f64Tokens refilled per minute.
Implementations§
Source§impl QuotaModel
impl QuotaModel
Trait Implementations§
Source§impl Clone for QuotaModel
impl Clone for QuotaModel
impl Copy for QuotaModel
Source§impl Debug for QuotaModel
impl Debug for QuotaModel
Source§impl<'de> Deserialize<'de> for QuotaModel
impl<'de> Deserialize<'de> for QuotaModel
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 QuotaModel
impl PartialEq for QuotaModel
Source§impl Serialize for QuotaModel
impl Serialize for QuotaModel
impl StructuralPartialEq for QuotaModel
Auto Trait Implementations§
impl Forget for QuotaModel
impl Freeze for QuotaModel
impl Move for QuotaModel
impl RefUnwindSafe for QuotaModel
impl Send for QuotaModel
impl Sync for QuotaModel
impl Unpin for QuotaModel
impl UnsafeUnpin for QuotaModel
impl UnwindSafe for QuotaModel
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