pub struct TokenReservation { /* private fields */ }Expand description
RAII guard that holds a token reservation for a tenant.
Created by TenantTokenTracker::reserve and automatically releases the
reserved token count back to the tracker when dropped, whether the request
succeeds, fails, or is cancelled. Callers should hold the reservation for
the duration of the LLM call to ensure the in-flight counter stays accurate.
Trait Implementations§
Source§impl Debug for TokenReservation
impl Debug for TokenReservation
Auto Trait Implementations§
impl Freeze for TokenReservation
impl !RefUnwindSafe for TokenReservation
impl Send for TokenReservation
impl Sync for TokenReservation
impl Unpin for TokenReservation
impl UnsafeUnpin for TokenReservation
impl !UnwindSafe for TokenReservation
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