pub struct BlockStatus {
pub tokens: u64,
pub cost: f64,
pub cache_read: u64,
pub pct_of_limit: Option<f64>,
pub resets_at: Option<String>,
pub secs_until_reset: Option<i64>,
pub elapsed_hr: Option<f64>,
pub burn_cost_per_hr: Option<f64>,
pub burn_tokens_per_min: Option<f64>,
pub projected_cost: Option<f64>,
pub eta_to_limit_secs: Option<i64>,
}Expand description
Burn snapshot for one agent’s active 5h window.
Fields§
§tokens: u64§cost: f64§cache_read: u64§pct_of_limit: Option<f64>Account utilization % of the 5h limit (from the usage API / statusline).
resets_at: Option<String>§secs_until_reset: Option<i64>Seconds until the window frees (clamped ≥ 0).
elapsed_hr: Option<f64>Hours elapsed since the window’s oldest turn (0..=5).
burn_cost_per_hr: Option<f64>Spend rate over the elapsed window, USD/hour.
burn_tokens_per_min: Option<f64>Token rate over the elapsed window, tokens/minute.
projected_cost: Option<f64>Projected window cost if the current rate holds to window end.
eta_to_limit_secs: Option<i64>Seconds until the account limit is hit at the current %/hour, if known.
Trait Implementations§
Source§impl Clone for BlockStatus
impl Clone for BlockStatus
Source§fn clone(&self) -> BlockStatus
fn clone(&self) -> BlockStatus
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 moreSource§impl Debug for BlockStatus
impl Debug for BlockStatus
Source§impl Default for BlockStatus
impl Default for BlockStatus
Source§fn default() -> BlockStatus
fn default() -> BlockStatus
Returns the “default value” for a type. Read more
Source§impl PartialEq for BlockStatus
impl PartialEq for BlockStatus
Source§fn eq(&self, other: &BlockStatus) -> bool
fn eq(&self, other: &BlockStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BlockStatus
impl Serialize for BlockStatus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BlockStatus
Auto Trait Implementations§
impl Freeze for BlockStatus
impl RefUnwindSafe for BlockStatus
impl Send for BlockStatus
impl Sync for BlockStatus
impl Unpin for BlockStatus
impl UnsafeUnpin for BlockStatus
impl UnwindSafe for BlockStatus
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