pub struct BudgetSnapshot {
pub total: Option<u64>,
pub spent: u64,
}Expand description
Live view of the run’s shared token pool, owned by the driver.
total == None means no ceiling is configured; JS then sees
budget.total === null and budget.remaining() === Infinity.
Fields§
§total: Option<u64>Pool ceiling in tokens, if one is configured.
spent: u64Tokens spent (plus driver-side reservations) against the pool.
Implementations§
Trait Implementations§
Source§impl Clone for BudgetSnapshot
impl Clone for BudgetSnapshot
Source§fn clone(&self) -> BudgetSnapshot
fn clone(&self) -> BudgetSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BudgetSnapshot
Source§impl Debug for BudgetSnapshot
impl Debug for BudgetSnapshot
Source§impl Default for BudgetSnapshot
impl Default for BudgetSnapshot
Source§fn default() -> BudgetSnapshot
fn default() -> BudgetSnapshot
Returns the “default value” for a type. Read more
impl Eq for BudgetSnapshot
Source§impl PartialEq for BudgetSnapshot
impl PartialEq for BudgetSnapshot
Source§fn eq(&self, other: &BudgetSnapshot) -> bool
fn eq(&self, other: &BudgetSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BudgetSnapshot
Auto Trait Implementations§
impl Freeze for BudgetSnapshot
impl RefUnwindSafe for BudgetSnapshot
impl Send for BudgetSnapshot
impl Sync for BudgetSnapshot
impl Unpin for BudgetSnapshot
impl UnsafeUnpin for BudgetSnapshot
impl UnwindSafe for BudgetSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.