pub struct Spend { /* private fields */ }Expand description
What one call is attributed against its budget, and where that figure came from.
The amount and the basis are one fact, so they are settled together and read apart.
Three of the four bases fix the amount outright — a call against a budget metered in
requests is one request, the model’s lower bound is one point, and a request a rate
limiter refused never ran and is nothing — and only Basis::Reported carries a figure
of its own, GitHub’s. Constructing the pair field by field would let a report say a call
GitHub never ran spent forty points, which is a measurement of nothing; the four
constructors below are the only ways to have one, and each is the invariant for its own
basis.
Implementations§
Trait Implementations§
impl Copy for Spend
impl Eq for Spend
impl StructuralPartialEq for Spend
Auto Trait Implementations§
impl Freeze for Spend
impl RefUnwindSafe for Spend
impl Send for Spend
impl Sync for Spend
impl Unpin for Spend
impl UnsafeUnpin for Spend
impl UnwindSafe for Spend
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