pub struct BudgetConsumption {
pub dimension: BudgetDimension,
pub amount: u64,
}Expand description
A unit of resource consumption reported by a handler after execution.
Handlers attach zero or more BudgetConsumption records to their output.
The dispatch loop durably records these and updates the in-memory
BudgetTracker after each attempt completes.
Fields§
§dimension: BudgetDimensionThe resource dimension being consumed.
amount: u64The amount consumed in this attempt.
Implementations§
Source§impl BudgetConsumption
impl BudgetConsumption
Sourcepub fn new(dimension: BudgetDimension, amount: u64) -> Self
pub fn new(dimension: BudgetDimension, amount: u64) -> Self
Creates a new consumption record.
Trait Implementations§
Source§impl Clone for BudgetConsumption
impl Clone for BudgetConsumption
Source§fn clone(&self) -> BudgetConsumption
fn clone(&self) -> BudgetConsumption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BudgetConsumption
impl Debug for BudgetConsumption
Source§impl PartialEq for BudgetConsumption
impl PartialEq for BudgetConsumption
impl Eq for BudgetConsumption
impl StructuralPartialEq for BudgetConsumption
Auto Trait Implementations§
impl Freeze for BudgetConsumption
impl RefUnwindSafe for BudgetConsumption
impl Send for BudgetConsumption
impl Sync for BudgetConsumption
impl Unpin for BudgetConsumption
impl UnsafeUnpin for BudgetConsumption
impl UnwindSafe for BudgetConsumption
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