Expand description
Hierarchical, process-local resource budgets for concurrent Rust task trees.
A Budget accounts for arbitrary integer-valued Resources. Child
budgets may add tighter limits, while every successful operation is also
recorded against every ancestor. Reservation and ReservationSet
provide cancellation-safe capacity claims which release on drop.
The crate is cooperative: code must receive and consult a budget for it to be constrained. It is not a security sandbox, rate limiter, billing ledger, or distributed quota service.
Structs§
- Budget
- A cloneable handle to one node in a hierarchical resource budget.
- Budget
Builder - Builder for a root or child
Budget. - Budget
Id - A process-local identifier for a budget node.
- Budget
Snapshot - A consistent read-only view of a budget node.
- Reservation
- A cancellation-safe reservation for one resource.
- Reservation
Set - An atomic, cancellation-safe reservation for several resources.
- Resource
- An application-defined resource category.
- Resource
Snapshot - A consistent read-only view of one resource at a budget node.
Enums§
- Budget
Build Error - Error returned when building a budget node.
- Budget
Error - Error returned by accounting and execution operations.
- Remaining
- Effective remaining capacity for a resource.
- Resource
Error - Error returned when constructing a resource.