pub struct UsageReport {
pub session: UsageSession,
pub rate_limits: Option<UsageReportRateLimits>,
pub extra: Map<String, Value>,
}Expand description
Structured twin of a /usage result, carried as
AssistantMessage::usage_report: the session’s totals, the plan’s
usage rows as the server sent them and the extra-usage spend, and nothing
else from the usage body (the get_usage control reply carries the
rest). Experimental — the shape may change.
Fields§
§session: UsageSessionCost and usage accumulated by the current session.
rate_limits: Option<UsageReportRateLimits>The plan’s usage rows and extra-usage spend from the claude.ai usage
endpoint; None when the CLI could not fetch them (no plan on this
lane, or a token without the profile scope).
extra: Map<String, Value>Trait Implementations§
Source§impl Clone for UsageReport
impl Clone for UsageReport
Source§fn clone(&self) -> UsageReport
fn clone(&self) -> UsageReport
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 UsageReport
impl Debug for UsageReport
Source§impl<'de> Deserialize<'de> for UsageReport
impl<'de> Deserialize<'de> for UsageReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UsageReport
impl RefUnwindSafe for UsageReport
impl Send for UsageReport
impl Sync for UsageReport
impl Unpin for UsageReport
impl UnsafeUnpin for UsageReport
impl UnwindSafe for UsageReport
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