pub struct KiroUsageInfo {
pub limit: i64,
pub used: i64,
pub reset_in_seconds: Option<i64>,
}Expand description
Parsed output from kiro-cli chat --no-interactive "/usage".
Kiro reports usage as a simple text block that is parsed into structured data. The CLI provider does not use HTTP; status is obtained by running a subprocess and parsing its stdout.
Fields§
§limit: i64Maximum requests allowed in the current window.
used: i64Requests consumed so far.
reset_in_seconds: Option<i64>Seconds remaining until the window resets, if applicable.
Implementations§
Source§impl KiroUsageInfo
impl KiroUsageInfo
Sourcepub fn is_limited(&self) -> bool
pub fn is_limited(&self) -> bool
Returns true when usage has reached or exceeded the limit.
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Returns usage as a percentage (0–100). Returns 100.0 when limit is zero or negative.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KiroUsageInfo
impl RefUnwindSafe for KiroUsageInfo
impl Send for KiroUsageInfo
impl Sync for KiroUsageInfo
impl Unpin for KiroUsageInfo
impl UnsafeUnpin for KiroUsageInfo
impl UnwindSafe for KiroUsageInfo
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