pub struct Reservation { /* private fields */ }Expand description
A held reservation: the per-budget amounts charged at reserve time, to be reconciled (or
released) once the actual usage is known. Opaque to the caller beyond passing it back, except for
the Observations it exposes for metrics.
Implementations§
Source§impl Reservation
impl Reservation
pub fn is_empty(&self) -> bool
Sourcepub fn observations(&self) -> &[Observation]
pub fn observations(&self) -> &[Observation]
The per-budget consumed ratios observed at reserve time (for edgeguard_llm_budget_consumed_ratio).
Sourcepub fn rollback_failures(&self) -> usize
pub fn rollback_failures(&self) -> usize
Rollback settle failures to feed into edgeguard_llm_budget_reconcile_failures_total,
like the return value of BudgetEngine::reconcile/BudgetEngine::release.
Trait Implementations§
Source§impl Debug for Reservation
impl Debug for Reservation
Source§impl Default for Reservation
impl Default for Reservation
Source§fn default() -> Reservation
fn default() -> Reservation
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Reservation
impl RefUnwindSafe for Reservation
impl Send for Reservation
impl Sync for Reservation
impl Unpin for Reservation
impl UnsafeUnpin for Reservation
impl UnwindSafe for Reservation
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