pub struct Report {
pub period_label: String,
pub now_ms: i64,
pub since_ms: i64,
pub period_end_ms: Option<i64>,
pub month_inferred: bool,
pub account: Option<Usage>,
pub five_hour: Totals,
pub weekly: Totals,
pub month: Totals,
pub models: Vec<ModelUsage>,
}Fields§
§period_label: StringWhat the caller called this period (“calendar month”, “all”, “30d”) for display.
now_ms: i64§since_ms: i64§period_end_ms: Option<i64>End of the period (epoch ms), resolved by the caller from its own start
— see next_month. None when the period has no boundary (--window all); the rolling 5h/weekly windows never carry one.
month_inferred: bool§account: Option<Usage>The account’s own three meters, when OpenCode Go’s usage endpoint
answered (ocuse::api). The dashboard’s window rows read from here
rather than from Self::five_hour/Self::weekly/Self::month,
because only the server’s numbers agree with the console; the store’s are
the fallback. None also keeps every existing caller working.
five_hour: Totals§weekly: Totals§month: Totals§models: Vec<ModelUsage>Sorted by month cost, descending.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
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